Ubuntu 20.04 LTS x86_64 安装 stable-diffusion-webui

这篇具有很好参考价值的文章主要介绍了Ubuntu 20.04 LTS x86_64 安装 stable-diffusion-webui。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

官网

Stable Diffusion官网 

Stability AI

Ubuntu 20.04 LTS x86_64 安装 stable-diffusion-webui,ubuntu,stable diffusion,linux

官方github

GitHub - Stability-AI/stablediffusion: High-Resolution Image Synthesis with Latent Diffusion Models

stable-diffusion-webui github

https://github.com/AUTOMATIC1111/stable-diffusion-webui

安装

下载stable-diffusion-webui

git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git

依赖

apt install -y git libtcmalloc-minimal

nvidia驱动

Ubuntu 20.04 LTS 安装 nvidia 驱动 + cuda 11.8 从开始到放弃!_hkNaruto的博客-CSDN博客

安装conda

wget  https://mirrors.bfsu.edu.cn/anaconda/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh

Ubuntu 20.04 LTS x86_64 安装 stable-diffusion-webui,ubuntu,stable diffusion,linux

打开一个新终端,配置源

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
conda config --set show_channel_urls yes

 编辑~/.condarc 内容如下即可。

Ubuntu 20.04 LTS x86_64 安装 stable-diffusion-webui,ubuntu,stable diffusion,linux

创建Python 3.10.6环境

conda create -n stable-diffusion-webui python=3.10.6
(base) yeqiang@yeqiang-MS-7B23:~/Downloads$ conda create -n stable-diffusion-webui python=3.10.6
Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /home/yeqiang/miniconda3/envs/stable-diffusion-webui

  added / updated specs:
    - python=3.10.6


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    _libgcc_mutex-0.1          |      conda_forge           3 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    _openmp_mutex-4.5          |            2_gnu          23 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    bzip2-1.0.8                |       h7f98852_4         484 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    ca-certificates-2023.5.7   |       hbcca054_0         145 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    ld_impl_linux-64-2.40      |       h41732ed_0         688 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    libffi-3.4.2               |       h7f98852_5          57 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    libgcc-ng-13.1.0           |       he5830b7_0         758 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    libgomp-13.1.0             |       he5830b7_0         409 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    libnsl-2.0.0               |       h7f98852_0          31 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    libsqlite-3.42.0           |       h2797004_0         809 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    libuuid-2.38.1             |       h0b41bf4_0          33 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    libzlib-1.2.13             |       hd590300_5          60 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    ncurses-6.4                |       hcb278e6_0         860 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    openssl-3.1.1              |       hd590300_1         2.5 MB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    pip-23.1.2                 |     pyhd8ed1ab_0         1.3 MB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    python-3.10.6              |ha86cf86_0_cpython        29.0 MB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    readline-8.2               |       h8228510_1         275 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    setuptools-68.0.0          |     pyhd8ed1ab_0         453 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    tk-8.6.12                  |       h27826a3_0         3.3 MB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    tzdata-2023c               |       h71feb2d_0         115 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    wheel-0.40.0               |     pyhd8ed1ab_0          54 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    xz-5.2.6                   |       h166bdaf_0         409 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    ------------------------------------------------------------
                                           Total:        41.6 MB

The following NEW packages will be INSTALLED:

  _libgcc_mutex      anaconda/cloud/conda-forge/linux-64::_libgcc_mutex-0.1-conda_forge 
  _openmp_mutex      anaconda/cloud/conda-forge/linux-64::_openmp_mutex-4.5-2_gnu 
  bzip2              anaconda/cloud/conda-forge/linux-64::bzip2-1.0.8-h7f98852_4 
  ca-certificates    anaconda/cloud/conda-forge/linux-64::ca-certificates-2023.5.7-hbcca054_0 
  ld_impl_linux-64   anaconda/cloud/conda-forge/linux-64::ld_impl_linux-64-2.40-h41732ed_0 
  libffi             anaconda/cloud/conda-forge/linux-64::libffi-3.4.2-h7f98852_5 
  libgcc-ng          anaconda/cloud/conda-forge/linux-64::libgcc-ng-13.1.0-he5830b7_0 
  libgomp            anaconda/cloud/conda-forge/linux-64::libgomp-13.1.0-he5830b7_0 
  libnsl             anaconda/cloud/conda-forge/linux-64::libnsl-2.0.0-h7f98852_0 
  libsqlite          anaconda/cloud/conda-forge/linux-64::libsqlite-3.42.0-h2797004_0 
  libuuid            anaconda/cloud/conda-forge/linux-64::libuuid-2.38.1-h0b41bf4_0 
  libzlib            anaconda/cloud/conda-forge/linux-64::libzlib-1.2.13-hd590300_5 
  ncurses            anaconda/cloud/conda-forge/linux-64::ncurses-6.4-hcb278e6_0 
  openssl            anaconda/cloud/conda-forge/linux-64::openssl-3.1.1-hd590300_1 
  pip                anaconda/cloud/conda-forge/noarch::pip-23.1.2-pyhd8ed1ab_0 
  python             anaconda/cloud/conda-forge/linux-64::python-3.10.6-ha86cf86_0_cpython 
  readline           anaconda/cloud/conda-forge/linux-64::readline-8.2-h8228510_1 
  setuptools         anaconda/cloud/conda-forge/noarch::setuptools-68.0.0-pyhd8ed1ab_0 
  tk                 anaconda/cloud/conda-forge/linux-64::tk-8.6.12-h27826a3_0 
  tzdata             anaconda/cloud/conda-forge/noarch::tzdata-2023c-h71feb2d_0 
  wheel              anaconda/cloud/conda-forge/noarch::wheel-0.40.0-pyhd8ed1ab_0 
  xz                 anaconda/cloud/conda-forge/linux-64::xz-5.2.6-h166bdaf_0 


Proceed ([y]/n)? y


Downloading and Extracting Packages
                                                                                                                                                         
Preparing transaction: done                                                                                                                              
Verifying transaction: done                                                                                                                              
Executing transaction: done                                                                                                                              
#                                                                                                                                                        
# To activate this environment, use                                                                                                                      
#                                                                                                                                                        
#     $ conda activate stable-diffusion-webui                                                                                                            
#                                                                                                                                                        
# To deactivate an active environment, use                                                                                                               
#                                                                                                                                                        
#     $ conda deactivate                                                                                                                                 
                                                                                                                                                         
(base) yeqiang@yeqiang-MS-7B23:~/Downloads$ 

注意:

以下方式

sudo apt update
sudo apt install python3 python3-venv

可能由于本机手动编译安装过其他版本Python而冲突,还是conda方便。

conda查看已安装的虚拟环境

 conda info --envs

激活

conda activate stable-diffusion-webui

查看版本

Ubuntu 20.04 LTS x86_64 安装 stable-diffusion-webui,ubuntu,stable diffusion,linux

pip国内清华源

mkdir ~/.pip
vim ~/.pip/pip.conf

输入内容

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host = pypi.tuna.tsinghua.edu.cn

安装依赖(自动)

conda activate stable-diffusion-webui
cd ~/Downloads/ai/stable-diffusion-webui
./webui.sh

日志

(stable-diffusion-webui) yeqiang@yeqiang-MS-7B23:~/Downloads/ai/stable-diffusion-webui$ ./webui.sh 

################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye)
################################################################

################################################################
Running on yeqiang user
################################################################

################################################################
Repo already cloned, using it as install directory
################################################################

################################################################
Create and activate python venv
################################################################

################################################################
Launching launch.py...
################################################################
Using TCMalloc: libtcmalloc_minimal.so.4
Python 3.10.6 | packaged by conda-forge | (main, Aug 22 2022, 20:36:39) [GCC 10.4.0]
Version: v1.4.0
Commit hash: 394ffa7b0a7fff3ec484bcd084e673a8b301ccc8
Installing gfpgan
Traceback (most recent call last):
  File "/home/yeqiang/Downloads/ai/stable-diffusion-webui/launch.py", line 38, in <module>
    main()
  File "/home/yeqiang/Downloads/ai/stable-diffusion-webui/launch.py", line 29, in main
    prepare_environment()
  File "/home/yeqiang/Downloads/ai/stable-diffusion-webui/modules/launch_utils.py", line 274, in prepare_environment
    run_pip(f"install {gfpgan_package}", "gfpgan")
  File "/home/yeqiang/Downloads/ai/stable-diffusion-webui/modules/launch_utils.py", line 130, in run_pip
    return run(f'"{python}" -m pip {command} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}", live=live)
  File "/home/yeqiang/Downloads/ai/stable-diffusion-webui/modules/launch_utils.py", line 107, in run
    raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't install gfpgan.
Command: "/home/yeqiang/Downloads/ai/stable-diffusion-webui/venv/bin/python3" -m pip install https://github.com/TencentARC/GFPGAN/archive/8d2447a2d918f8eba5a4a01463fd48e45126a379.zip --prefer-binary
Error code: 1
stdout: Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting https://github.com/TencentARC/GFPGAN/archive/8d2447a2d918f8eba5a4a01463fd48e45126a379.zip
  Using cached https://github.com/TencentARC/GFPGAN/archive/8d2447a2d918f8eba5a4a01463fd48e45126a379.zip (6.0 MB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting basicsr>=1.4.2
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/86/41/00a6b000f222f0fa4c6d9e1d6dcc9811a374cabb8abb9d408b77de39648c/basicsr-1.4.2.tar.gz (172 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting facexlib>=0.2.5
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/36/7b/2147339dafe1c4800514c9c21ee4444f8b419ce51dfc7695220a8e0069a6/facexlib-0.3.0-py3-none-any.whl (59 kB)
Collecting lmdb
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/83/67/8f32a70336d3ff1149cbd31e5a877997384f78c3940edc0abff95c8a5601/lmdb-1.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (299 kB)
Requirement already satisfied: numpy in ./venv/lib/python3.10/site-packages (from gfpgan==1.3.5) (1.25.0)
Collecting opencv-python
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/34/7c/8a5043f362b0a55f07812a0db3f86092cdbd0fe41b933d7bc6fce3ab6c15/opencv_python-4.8.0.74-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (61.7 MB)
Collecting pyyaml
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/02/25/6ba9f6bb50a3d4fbe22c1a02554dc670682a07c8701d1716d19ddea2c940/PyYAML-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (682 kB)
Collecting scipy
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/14/f2/10fa23f0a6b9b2439c01579ae4a9b1849d4822e972515c8f92584bfda5e9/scipy-1.11.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (36.3 MB)

stderr: ERROR: Ignored the following versions that require a different python version: 1.6.2 Requires-Python >=3.7,<3.10; 1.6.3 Requires-Python >=3.7,<3.10; 1.7.0 Requires-Python >=3.7,<3.10; 1.7.1 Requires-Python >=3.7,<3.10
ERROR: Could not find a version that satisfies the requirement tb-nightly (from gfpgan) (from versions: none)
ERROR: No matching distribution found for tb-nightly

[notice] A new release of pip available: 22.2.1 -> 23.1.2
[notice] To update, run: pip install --upgrade pip

2天过去了,这速度。。。

Ubuntu 20.04 LTS x86_64 安装 stable-diffusion-webui,ubuntu,stable diffusion,linux

日志

(stable-diffusion-webui) yeqiang@yeqiang-MS-7B23:~/Downloads/ai/stable-diffusion-webui$ ./webui.sh 

################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye)
################################################################

################################################################
Running on yeqiang user
################################################################

################################################################
Repo already cloned, using it as install directory
################################################################

################################################################
Create and activate python venv
################################################################

################################################################
Launching launch.py...
################################################################
Using TCMalloc: libtcmalloc_minimal.so.4
Python 3.10.6 | packaged by conda-forge | (main, Aug 22 2022, 20:36:39) [GCC 10.4.0]
Version: v1.4.0
Commit hash: 394ffa7b0a7fff3ec484bcd084e673a8b301ccc8
Installing gfpgan
Installing clip
Installing open_clip
Cloning Stable Diffusion into /home/yeqiang/Downloads/ai/stable-diffusion-webui/repositories/stable-diffusion-stability-ai...
Cloning K-diffusion into /home/yeqiang/Downloads/ai/stable-diffusion-webui/repositories/k-diffusion...
Cloning CodeFormer into /home/yeqiang/Downloads/ai/stable-diffusion-webui/repositories/CodeFormer...
Cloning BLIP into /home/yeqiang/Downloads/ai/stable-diffusion-webui/repositories/BLIP...
Installing requirements for CodeFormer
Installing requirements
Traceback (most recent call last):
  File "/home/yeqiang/Downloads/ai/stable-diffusion-webui/launch.py", line 38, in <module>
    main()
  File "/home/yeqiang/Downloads/ai/stable-diffusion-webui/launch.py", line 29, in main
    prepare_environment()
  File "/home/yeqiang/Downloads/ai/stable-diffusion-webui/modules/launch_utils.py", line 309, in prepare_environment
    run_pip(f"install -r \"{requirements_file}\"", "requirements")
  File "/home/yeqiang/Downloads/ai/stable-diffusion-webui/modules/launch_utils.py", line 130, in run_pip
    return run(f'"{python}" -m pip {command} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}", live=live)
  File "/home/yeqiang/Downloads/ai/stable-diffusion-webui/modules/launch_utils.py", line 107, in run
    raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't install requirements.
Command: "/home/yeqiang/Downloads/ai/stable-diffusion-webui/venv/bin/python3" -m pip install -r "requirements_versions.txt" --prefer-binary
Error code: 1
stdout: Collecting GitPython==3.1.30
  Downloading GitPython-3.1.30-py3-none-any.whl (184 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 184.0/184.0 kB 70.5 kB/s eta 0:00:00
Collecting Pillow==9.5.0
  Using cached Pillow-9.5.0-cp310-cp310-manylinux_2_28_x86_64.whl (3.4 MB)
Collecting accelerate==0.18.0
  Downloading accelerate-0.18.0-py3-none-any.whl (215 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 215.3/215.3 kB 18.6 kB/s eta 0:00:00
Requirement already satisfied: basicsr==1.4.2 in ./venv/lib/python3.10/site-packages (from -r requirements_versions.txt (line 4)) (1.4.2)
Collecting blendmodes==2022
  Downloading blendmodes-2022-py3-none-any.whl (10 kB)
Collecting clean-fid==0.1.35
  Downloading clean_fid-0.1.35-py3-none-any.whl (26 kB)
Collecting einops==0.4.1
  Downloading einops-0.4.1-py3-none-any.whl (28 kB)
Collecting fastapi==0.94.0
  Downloading fastapi-0.94.0-py3-none-any.whl (56 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 56.3/56.3 kB 8.2 kB/s eta 0:00:00
Collecting gfpgan==1.3.8
  Using cached gfpgan-1.3.8-py3-none-any.whl (52 kB)
Collecting gradio==3.32.0
  Downloading gradio-3.32.0-py3-none-any.whl (19.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 19.9/19.9 MB 10.3 kB/s eta 0:00:00
Collecting httpcore<=0.15
  Downloading httpcore-0.15.0-py3-none-any.whl (68 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 68.4/68.4 kB 9.1 kB/s eta 0:00:00
Collecting inflection==0.5.1
  Downloading inflection-0.5.1-py2.py3-none-any.whl (9.5 kB)
Collecting jsonmerge==1.8.0
  Downloading jsonmerge-1.8.0.tar.gz (26 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting kornia==0.6.7
  Downloading kornia-0.6.7-py2.py3-none-any.whl (565 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 565.1/565.1 kB 8.3 kB/s eta 0:00:00
Collecting lark==1.1.2
  Downloading lark-1.1.2-py2.py3-none-any.whl (104 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 104.7/104.7 kB 10.3 kB/s eta 0:00:00
Collecting numpy==1.23.5
  Using cached numpy-1.23.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.1 MB)
Collecting omegaconf==2.2.3
  Downloading omegaconf-2.2.3-py3-none-any.whl (79 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 79.3/79.3 kB 9.9 kB/s eta 0:00:00
Collecting piexif==1.1.3
  Downloading piexif-1.1.3-py2.py3-none-any.whl (20 kB)
Collecting psutil~=5.9.5
  Using cached psutil-5.9.5-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (282 kB)
Collecting pytorch_lightning==1.9.4
  Downloading pytorch_lightning-1.9.4-py3-none-any.whl (827 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 827.8/827.8 kB 10.5 kB/s eta 0:00:00
Collecting realesrgan==0.3.0
  Downloading realesrgan-0.3.0-py3-none-any.whl (26 kB)
Collecting resize-right==0.0.2
  Downloading resize_right-0.0.2-py3-none-any.whl (8.9 kB)
Collecting safetensors==0.3.1
  Downloading safetensors-0.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.3/1.3 MB 9.5 kB/s eta 0:00:00
Collecting scikit-image==0.20.0
  Downloading scikit_image-0.20.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 13.2/13.2 MB 9.9 kB/s eta 0:00:00
Collecting timm==0.6.7
  Downloading timm-0.6.7-py3-none-any.whl (509 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 510.0/510.0 kB 7.9 kB/s eta 0:00:00
Collecting tomesd==0.1.2
  Downloading tomesd-0.1.2-py3-none-any.whl (11 kB)
Requirement already satisfied: torch in ./venv/lib/python3.10/site-packages (from -r requirements_versions.txt (line 27)) (2.0.1+cu118)
Collecting torchdiffeq==0.2.3
  Downloading torchdiffeq-0.2.3-py3-none-any.whl (31 kB)
Collecting torchsde==0.2.5
  Downloading torchsde-0.2.5-py3-none-any.whl (59 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 59.2/59.2 kB 8.5 kB/s eta 0:00:00
Collecting transformers==4.25.1
  Downloading transformers-4.25.1-py3-none-any.whl (5.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.8/5.8 MB 9.3 kB/s eta 0:00:00
Collecting gitdb<5,>=4.0.1
  Downloading gitdb-4.0.10-py3-none-any.whl (62 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.7/62.7 kB 7.2 kB/s eta 0:00:00
Requirement already satisfied: pyyaml in ./venv/lib/python3.10/site-packages (from accelerate==0.18.0->-r requirements_versions.txt (line 3)) (6.0)
Requirement already satisfied: packaging>=20.0 in ./venv/lib/python3.10/site-packages (from accelerate==0.18.0->-r requirements_versions.txt (line 3)) (23.1)
Requirement already satisfied: addict in ./venv/lib/python3.10/site-packages (from basicsr==1.4.2->-r requirements_versions.txt (line 4)) (2.4.0)
Requirement already satisfied: future in ./venv/lib/python3.10/site-packages (from basicsr==1.4.2->-r requirements_versions.txt (line 4)) (0.18.3)
Requirement already satisfied: lmdb in ./venv/lib/python3.10/site-packages (from basicsr==1.4.2->-r requirements_versions.txt (line 4)) (1.4.1)
Requirement already satisfied: opencv-python in ./venv/lib/python3.10/site-packages (from basicsr==1.4.2->-r requirements_versions.txt (line 4)) (4.8.0.74)
Requirement already satisfied: requests in ./venv/lib/python3.10/site-packages (from basicsr==1.4.2->-r requirements_versions.txt (line 4)) (2.31.0)
Requirement already satisfied: scipy in ./venv/lib/python3.10/site-packages (from basicsr==1.4.2->-r requirements_versions.txt (line 4)) (1.11.1)
Requirement already satisfied: tb-nightly in ./venv/lib/python3.10/site-packages (from basicsr==1.4.2->-r requirements_versions.txt (line 4)) (2.14.0a20230704)
Requirement already satisfied: torchvision in ./venv/lib/python3.10/site-packages (from basicsr==1.4.2->-r requirements_versions.txt (line 4)) (0.15.2+cu118)
Requirement already satisfied: tqdm in ./venv/lib/python3.10/site-packages (from basicsr==1.4.2->-r requirements_versions.txt (line 4)) (4.65.0)
Requirement already satisfied: yapf in ./venv/lib/python3.10/site-packages (from basicsr==1.4.2->-r requirements_versions.txt (line 4)) (0.40.1)
Collecting aenum<4,>=3.1.7
  Downloading aenum-3.1.15-py3-none-any.whl (137 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 137.6/137.6 kB 8.7 kB/s eta 0:00:00
Collecting deprecation<3,>=2.1.0
  Downloading deprecation-2.1.0-py2.py3-none-any.whl (11 kB)
Collecting starlette<0.27.0,>=0.26.0
  Downloading starlette-0.26.1-py3-none-any.whl (66 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 66.9/66.9 kB 6.0 kB/s eta 0:00:00
Collecting pydantic!=1.7,!=1.7.1,!=1.7.2,!=1.7.3,!=1.8,!=1.8.1,<2.0.0,>=1.6.2
  Downloading pydantic-1.10.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.1/3.1 MB 10.0 kB/s eta 0:00:00
Requirement already satisfied: facexlib>=0.2.5 in ./venv/lib/python3.10/site-packages (from gfpgan==1.3.8->-r requirements_versions.txt (line 9)) (0.3.0)
Collecting orjson
  Downloading orjson-3.9.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (136 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 137.0/137.0 kB 8.6 kB/s eta 0:00:00
Collecting httpx
  Downloading httpx-0.24.1-py3-none-any.whl (75 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 75.4/75.4 kB 7.6 kB/s eta 0:00:00
Collecting ffmpy
  Downloading ffmpy-0.3.0.tar.gz (4.8 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting markdown-it-py[linkify]>=2.0.0
  Downloading markdown_it_py-3.0.0-py3-none-any.whl (87 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 87.5/87.5 kB 9.5 kB/s eta 0:00:00
Requirement already satisfied: matplotlib in ./venv/lib/python3.10/site-packages (from gradio==3.32.0->-r requirements_versions.txt (line 10)) (3.7.1)
Collecting aiohttp
  Downloading aiohttp-3.8.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.0/1.0 MB 6.3 kB/s eta 0:00:00
Requirement already satisfied: markupsafe in ./venv/lib/python3.10/site-packages (from gradio==3.32.0->-r requirements_versions.txt (line 10)) (2.1.3)
Collecting gradio-client>=0.2.4
  Downloading gradio_client-0.2.7-py3-none-any.whl (288 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 288.4/288.4 kB 8.7 kB/s eta 0:00:00
Requirement already satisfied: typing-extensions in ./venv/lib/python3.10/site-packages (from gradio==3.32.0->-r requirements_versions.txt (line 10)) (4.7.1)
Collecting aiofiles
  Downloading aiofiles-23.1.0-py3-none-any.whl (14 kB)
Collecting semantic-version
  Downloading semantic_version-2.10.0-py2.py3-none-any.whl (15 kB)
Collecting pygments>=2.12.0
  Downloading Pygments-2.15.1-py3-none-any.whl (1.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 7.3 kB/s eta 0:00:00
Collecting pydub
  Downloading pydub-0.25.1-py2.py3-none-any.whl (32 kB)
Collecting pandas
  Downloading pandas-2.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.3/12.3 MB 8.2 kB/s eta 0:00:00
Requirement already satisfied: huggingface-hub>=0.13.0 in ./venv/lib/python3.10/site-packages (from gradio==3.32.0->-r requirements_versions.txt (line 10)) (0.15.1)
Requirement already satisfied: jinja2 in ./venv/lib/python3.10/site-packages (from gradio==3.32.0->-r requirements_versions.txt (line 10)) (3.1.2)
Collecting websockets>=10.0
  Downloading websockets-11.0.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (129 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 129.9/129.9 kB 5.7 kB/s eta 0:00:00
Collecting uvicorn>=0.14.0
  Downloading uvicorn-0.22.0-py3-none-any.whl (58 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.3/58.3 kB 5.9 kB/s eta 0:00:00
Collecting python-multipart
  Downloading python_multipart-0.0.6-py3-none-any.whl (45 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 45.7/45.7 kB 8.0 kB/s eta 0:00:00
Collecting mdit-py-plugins<=0.3.3
  Downloading mdit_py_plugins-0.3.3-py3-none-any.whl (50 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 50.5/50.5 kB 8.9 kB/s eta 0:00:00
Collecting altair>=4.2.0
  Downloading altair-5.0.1-py3-none-any.whl (471 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 471.5/471.5 kB 9.1 kB/s eta 0:00:00
Collecting jsonschema
  Downloading jsonschema-4.17.3-py3-none-any.whl (90 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 90.4/90.4 kB 8.1 kB/s eta 0:00:00
Collecting antlr4-python3-runtime==4.9.*
  Downloading antlr4-python3-runtime-4.9.3.tar.gz (117 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 117.0/117.0 kB 6.0 kB/s eta 0:00:00
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: fsspec[http]>2021.06.0 in ./venv/lib/python3.10/site-packages (from pytorch_lightning==1.9.4->-r requirements_versions.txt (line 20)) (2023.6.0)
Collecting torchmetrics>=0.7.0
  Downloading torchmetrics-0.11.4-py3-none-any.whl (519 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 519.2/519.2 kB 8.1 kB/s eta 0:00:00
Collecting lightning-utilities>=0.6.0.post0
  Downloading lightning_utilities-0.9.0-py3-none-any.whl (23 kB)
Requirement already satisfied: networkx>=2.8 in ./venv/lib/python3.10/site-packages (from scikit-image==0.20.0->-r requirements_versions.txt (line 24)) (3.1)
Requirement already satisfied: lazy_loader>=0.1 in ./venv/lib/python3.10/site-packages (from scikit-image==0.20.0->-r requirements_versions.txt (line 24)) (0.3)
Requirement already satisfied: tifffile>=2019.7.26 in ./venv/lib/python3.10/site-packages (from scikit-image==0.20.0->-r requirements_versions.txt (line 24)) (2023.7.4)
Requirement already satisfied: imageio>=2.4.1 in ./venv/lib/python3.10/site-packages (from scikit-image==0.20.0->-r requirements_versions.txt (line 24)) (2.31.1)
Requirement already satisfied: PyWavelets>=1.1.1 in ./venv/lib/python3.10/site-packages (from scikit-image==0.20.0->-r requirements_versions.txt (line 24)) (1.4.1)
Collecting boltons>=20.2.1
  Downloading boltons-23.0.0-py2.py3-none-any.whl (194 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 194.8/194.8 kB 7.5 kB/s eta 0:00:00
Collecting trampoline>=0.1.2
  Downloading trampoline-0.1.2-py3-none-any.whl (5.2 kB)
INFO: pip is looking at multiple versions of torchsde to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of torchdiffeq to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of tomesd to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of timm to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of scikit-image to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of safetensors to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of resize-right to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of realesrgan to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of pytorch-lightning to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of piexif to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of omegaconf to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of numpy to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of lark to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of kornia to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of jsonmerge to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of inflection to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of gradio to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of gfpgan to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of fastapi to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of einops to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of clean-fid to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of blendmodes to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of basicsr to determine which version is compatible with other requirements. This could take a while.
Collecting basicsr==1.4.2
  Using cached basicsr-1.4.2.tar.gz (172 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
INFO: pip is looking at multiple versions of accelerate to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of pillow to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of <Python from Requires-Python> to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of gitpython to determine which version is compatible with other requirements. This could take a while.

stderr: WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/httpcore/
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/timm/
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /simple/gitdb/
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /simple/orjson/
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/websockets/
ERROR: Could not find a version that satisfies the requirement tokenizers!=0.11.3,<0.14,>=0.11.1 (from transformers) (from versions: none)
ERROR: No matching distribution found for tokenizers!=0.11.3,<0.14,>=0.11.1

[notice] A new release of pip available: 22.2.1 -> 23.1.2
[notice] To update, run: pip install --upgrade pip

说明:国内清华镜像与官方仓库不是完全一致,导致安装出错

网络故障,重试(用国内镜像,报错。不用网络又不行。。。)

等。。。

故障处理

RuntimeError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check

Traceback (most recent call last):
  File "/home/yeqiang/Downloads/ai/stable-diffusion-webui/launch.py", line 38, in <module>
    main()
  File "/home/yeqiang/Downloads/ai/stable-diffusion-webui/launch.py", line 29, in main
    prepare_environment()
  File "/home/yeqiang/Downloads/ai/stable-diffusion-webui/modules/launch_utils.py", line 268, in prepare_environment
    raise RuntimeError(
RuntimeError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check

驱动不匹配文章来源地址https://www.toymoban.com/news/detail-517495.html

(stable-diffusion-webui) yeqiang@yeqiang-MS-7B23:~/Downloads/ai/stable-diffusion-webui$ nvidia-smi 
Failed to initialize NVML: Driver/library version mismatch
(stable-diffusion-webui) yeqiang@yeqiang-MS-7B23:~/Downloads/ai/stable-diffusion-webui$ cat /sys/module/nvidia/version 
520.61.05
(stable-diffusion-webui) yeqiang@yeqiang-MS-7B23:~/Downloads/ai/stable-diffusion-webui$ cat /proc/driver/nvidia/version 
NVRM version: NVIDIA UNIX x86_64 Kernel Module  520.61.05  Thu Sep 29 05:30:25 UTC 2022
GCC version:  gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1) 

Cannot locate TCMalloc (improves CPU memory usage)

sudo apt install libtcmalloc-minimal4

到了这里,关于Ubuntu 20.04 LTS x86_64 安装 stable-diffusion-webui的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • Ubuntu20.04_x86交叉编译aarch64版本的tslib1.22步骤

    编译环境:小米笔记本+Windows10+VMware17 +Ubuntu20.04虚拟机 编译目标:需要生成aarch64环境下对应的触摸屏驱动。 编译步骤: 1、下载aarch64-linux-gnu编译器,下载地址为:https://releases.linaro.org/components/toolchain/binaries/7.5-2019.12/aarch64-linux-gnu/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu.tar.x

    2024年02月16日
    浏览(47)
  • Ubuntu20.04LTS安装CUDA并支持多版本切换

    如果Ubuntu系统还没有安装显卡驱动,参考这篇文章:Ubuntu20.04LTS安装RTX-3060显卡驱动 当显卡驱动安装完成后,需要使用 nvidia-smi 命令查看英伟达显卡驱动版本。 如上图所示,英伟达驱动版本为520.61.05,CUDA最高支持的版本为11.8。 点击该链接:https://docs.nvidia.com/cuda/cuda-toolkit-

    2024年02月13日
    浏览(70)
  • Ubuntu 22.04.2 LTS LTS x86_64 安装 stable-diffusion-webui 【2】基本版本完结。

    前篇 Ubuntu 20.04 LTS x86_64 安装 stable-diffusion-webui_hkNaruto的博客-CSDN博客 内容太多,分第二篇继续 中途重装了机器,20.04 ,apt upgrade后自动升级到22.04.2 现状:起来了,又没完全起来 启动日志 界面 获得阶段性成果了。 参考故障处理1. 下载资源,再次启动 成果启动,测试1girl看看

    2024年02月16日
    浏览(36)
  • 64位Ubuntu20.04.5 LTS系统安装32位运行库

    背景: 在ubutu(版本为20.04.5 LTS)中运行./arm-none-linux-gnueabi-gcc -v 后提示“no such device”。 经多方查证,是ubutu的版本是64位的,而需要运行的编译工具链是32位的,因此会不兼容。 解决方法就是在ubuntu中安装32位的运行环境 如何安装32位的运行环境: 执行以下3条命令: 但是问

    2024年02月07日
    浏览(34)
  • Ubuntu 20.04 LTS 安装ttf-mscorefonts-installer的方法

    试了如下两种方法,都不行。对方法1修改了一下OK了。 安装ttf-mscorefonts-installer中出错的原因是需要的文件无法下载 安装ttf-mscorefonts-installer中出错的原因是需要的文件无法下载。我们可以事先下载好,在安装ttf-mscorefonts-installer1. 下载所需的所有的字体,到http://sourceforge.net

    2024年02月04日
    浏览(49)
  • 英特尔13代桌面CPU平台安装ubuntu20.04LTS记录

    安装环境一: i7-13700K  华硕Z790-P  16X2GB内存   华硕 TUF 3070 O8G 安装环境二: i5-13400    华硕B760M-A D4 8x2GB内存   UHD730核显 安装系统: ubuntu20.04LTS(首先用光驱安装失败,后面用U盘更换ubuntu22.04.2LTS成功) 因为特殊原因,先用光驱安装ubuntu20.04LTS,首先安装很慢很慢,要等半小时进

    2024年02月06日
    浏览(84)
  • 【Ubuntu 20.04LTS系统】安装CUDA11.8、cuDNN,可进行CUDA版本切换

    https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/ 更新软件列表和必要的依赖项 步骤一: 下载CUDA安装包 进行CUDA和cuDNN的选择,也可以直接根据官方推荐进行下载安装。 从Nvidia官网下载CUDA https://developer.nvidia.com/cuda-downloads 下方链接,选择更多版本 https://developer.nvidia.com/cuda-toolkit-archiv

    2024年02月16日
    浏览(71)
  • Linux(7)Ubuntu20.04 arm64安装Docker

    vi /etc/apt/sources.list 这个命令后面跟了几个软件包的名字,它们分别是: apt-transport-https:这个软件包允许apt使用HTTPS协议来访问软件源。 ca-certificates:这个软件包提供了一些受信任的证书颁发机构的证书,用来验证HTTPS连接的安全性。 curl:这个软件包提供了一个命令行工具,

    2024年02月10日
    浏览(62)
  • Ubuntu 20.04 LTS 系统下 安装Nvidia 显卡驱动、CUDA、cuDNN, 并可进行CUDA版本切换

    因为做深度学习的研究项目,为全新机器在Ubuntu 20.04 LTS 系统下 安装Nvidia 显卡驱动、Cuda、Cudnn。并进行CUDA版本切换 成功安装完成了,写个记录。 步骤一: 安装更新软件列表和依赖项 在安装Nvidia显卡驱动之前,需要更新软件列表和必要的依赖项。 步骤二: 查看GPU型号,并

    2024年02月13日
    浏览(69)
  • Ubuntu 20.04 LTS 修改IP地址

    在Ubuntu20.04中,传统的配置/etc/network/interfaces已无效!需要打开 yaml 文件,在 /etc/netplan 文件夹下,不同机器的文件名不一样。通过编辑yaml文件进行配置(一定注意缩进格式),如下: 注意: 这是修改为静态IP的方式,所以上面的 DHCP4:最好改成 FALSE ,防止自动获取IP,导致

    2024年02月02日
    浏览(43)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包