当前位置:   article > 正文

Paints-UNDO_paintsundo 部署方法

paintsundo 部署方法

Ubuntu 20.04 安装 conda

mkdir -p ~/miniconda3
cd ~/miniconda3
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
~/miniconda3/bin/conda init bash
source ~/.bashrc
conda --version
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
git clone https://github.com/lllyasviel/Paints-UNDO.git
cd Paints-UNDO
conda create -n paints_undo python=3.10
conda activate paints_undo
pip install xformers
pip install -r requirements.txt
python gradio_app.py
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
conda deactivate
  • 1
conda activate paints_undo
  • 1
# python gradio_app.py
Traceback (most recent call last):
  File "/root/Paints-UNDO/gradio_app.py", line 13, in <module>
    import torch
  File "/root/miniconda3/envs/paints_undo/lib/python3.10/site-packages/torch/__init__.py", line 239, in <module>
    from torch._C import *  # noqa: F403
ImportError: /root/miniconda3/envs/paints_undo/lib/python3.10/site-packages/torch/lib/../../nvidia/cusparse/lib/libcusparse.so.12: undefined symbol: __nvJitLinkAddData_12_1, version libnvJitLink.so.12
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
# nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Mon_Oct_24_19:12:58_PDT_2022
Cuda compilation tools, release 12.0, V12.0.76
Build cuda_12.0.r12.0/compiler.31968024_0
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
pip uninstall torch torchvision torchaudio
  • 1

cu117 不支持

pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117
  • 1

cu118 支持 cuda 12.0

pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
  • 1
conda deactivate
  • 1
conda activate paints_undo
cd Paints-UNDO
python gradio_app.py
  • 1
  • 2
  • 3
# python gradio_app.py
Traceback (most recent call last):
  File "/root/Paints-UNDO/gradio_app.py", line 39, in <module>
    tokenizer = CLIPTokenizer.from_pretrained(model_name, subfolder="tokenizer")
  File "/root/miniconda3/envs/paints_undo/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 2094, in from_pretrained
    raise EnvironmentError(
OSError: Can't load tokenizer for 'lllyasviel/paints_undo_single_frame'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure 'lllyasviel/paints_undo_single_frame' is the correct path to a directory containing all relevant files for a CLIPTokenizer tokenizer.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
pip install httpx[socks]
  • 1
Running on local URL:  http://0.0.0.0:7860
  • 1
conda activate paints_undo
cd Paints-UNDO
python gradio_app.py
  • 1
  • 2
  • 3

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/人工智能uu/article/detail/861409
推荐阅读
相关标签
  

闽ICP备14008679号