当前位置:   article > 正文

Ubuntu 20.04 LTS x86_64 安装 stable-diffusion-webui_cannot locate tcmalloc (improves cpu memory usage)

cannot locate tcmalloc (improves cpu memory usage)

官网

Stable Diffusion官网 

Stability AI

官方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

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

打开一个新终端,配置源

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

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

创建Python 3.10.6环境

conda create -n stable-diffusion-webui python=3.10.6
  1. (base) yeqiang@yeqiang-MS-7B23:~/Downloads$ conda create -n stable-diffusion-webui python=3.10.6
  2. Collecting package metadata (current_repodata.json): done
  3. Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
  4. Collecting package metadata (repodata.json): done
  5. Solving environment: done
  6. ## Package Plan ##
  7. environment location: /home/yeqiang/miniconda3/envs/stable-diffusion-webui
  8. added / updated specs:
  9. - python=3.10.6
  10. The following packages will be downloaded:
  11. package | build
  12. ---------------------------|-----------------
  13. _libgcc_mutex-0.1 | conda_forge 3 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
  14. _openmp_mutex-4.5 | 2_gnu 23 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
  15. bzip2-1.0.8 | h7f98852_4 484 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
  16. ca-certificates-2023.5.7 | hbcca054_0 145 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
  17. ld_impl_linux-64-2.40 | h41732ed_0 688 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
  18. libffi-3.4.2 | h7f98852_5 57 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
  19. libgcc-ng-13.1.0 | he5830b7_0 758 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
  20. libgomp-13.1.0 | he5830b7_0 409 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
  21. libnsl-2.0.0 | h7f98852_0 31 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
  22. libsqlite-3.42.0 | h2797004_0 809 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
  23. libuuid-2.38.1 | h0b41bf4_0 33 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
  24. libzlib-1.2.13 | hd590300_5 60 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
  25. ncurses-6.4 | hcb278e6_0 860 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
  26. openssl-3.1.1 | hd590300_1 2.5 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
  27. pip-23.1.2 | pyhd8ed1ab_0 1.3 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
  28. python-3.10.6 |ha86cf86_0_cpython 29.0 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
  29. readline-8.2 | h8228510_1 275 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
  30. setuptools-68.0.0 | pyhd8ed1ab_0 453 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
  31. tk-8.6.12 | h27826a3_0 3.3 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
  32. tzdata-2023c | h71feb2d_0 115 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
  33. wheel-0.40.0 | pyhd8ed1ab_0 54 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
  34. xz-5.2.6 | h166bdaf_0 409 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
  35. ------------------------------------------------------------
  36. Total: 41.6 MB
  37. The following NEW packages will be INSTALLED:
  38. _libgcc_mutex anaconda/cloud/conda-forge/linux-64::_libgcc_mutex-0.1-conda_forge
  39. _openmp_mutex anaconda/cloud/conda-forge/linux-64::_openmp_mutex-4.5-2_gnu
  40. bzip2 anaconda/cloud/conda-forge/linux-64::bzip2-1.0.8-h7f98852_4
  41. ca-certificates anaconda/cloud/conda-forge/linux-64::ca-certificates-2023.5.7-hbcca054_0
  42. ld_impl_linux-64 anaconda/cloud/conda-forge/linux-64::ld_impl_linux-64-2.40-h41732ed_0
  43. libffi anaconda/cloud/conda-forge/linux-64::libffi-3.4.2-h7f98852_5
  44. libgcc-ng anaconda/cloud/conda-forge/linux-64::libgcc-ng-13.1.0-he5830b7_0
  45. libgomp anaconda/cloud/conda-forge/linux-64::libgomp-13.1.0-he5830b7_0
  46. libnsl anaconda/cloud/conda-forge/linux-64::libnsl-2.0.0-h7f98852_0
  47. libsqlite anaconda/cloud/conda-forge/linux-64::libsqlite-3.42.0-h2797004_0
  48. libuuid anaconda/cloud/conda-forge/linux-64::libuuid-2.38.1-h0b41bf4_0
  49. libzlib anaconda/cloud/conda-forge/linux-64::libzlib-1.2.13-hd590300_5
  50. ncurses anaconda/cloud/conda-forge/linux-64::ncurses-6.4-hcb278e6_0
  51. openssl anaconda/cloud/conda-forge/linux-64::openssl-3.1.1-hd590300_1
  52. pip anaconda/cloud/conda-forge/noarch::pip-23.1.2-pyhd8ed1ab_0
  53. python anaconda/cloud/conda-forge/linux-64::python-3.10.6-ha86cf86_0_cpython
  54. readline anaconda/cloud/conda-forge/linux-64::readline-8.2-h8228510_1
  55. setuptools anaconda/cloud/conda-forge/noarch::setuptools-68.0.0-pyhd8ed1ab_0
  56. tk anaconda/cloud/conda-forge/linux-64::tk-8.6.12-h27826a3_0
  57. tzdata anaconda/cloud/conda-forge/noarch::tzdata-2023c-h71feb2d_0
  58. wheel anaconda/cloud/conda-forge/noarch::wheel-0.40.0-pyhd8ed1ab_0
  59. xz anaconda/cloud/conda-forge/linux-64::xz-5.2.6-h166bdaf_0
  60. Proceed ([y]/n)? y
  61. Downloading and Extracting Packages
  62. Preparing transaction: done
  63. Verifying transaction: done
  64. Executing transaction: done
  65. #
  66. # To activate this environment, use
  67. #
  68. # $ conda activate stable-diffusion-webui
  69. #
  70. # To deactivate an active environment, use
  71. #
  72. # $ conda deactivate
  73. (base) yeqiang@yeqiang-MS-7B23:~/Downloads$

注意:

以下方式

  1. sudo apt update
  2. sudo apt install python3 python3-venv

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

conda查看已安装的虚拟环境

 conda info --envs

激活

conda activate stable-diffusion-webui

查看版本

pip国内清华源

  1. mkdir ~/.pip
  2. vim ~/.pip/pip.conf

输入内容

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

安装依赖(自动)

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

日志

  1. (stable-diffusion-webui) yeqiang@yeqiang-MS-7B23:~/Downloads/ai/stable-diffusion-webui$ ./webui.sh
  2. ################################################################
  3. Install script for stable-diffusion + Web UI
  4. Tested on Debian 11 (Bullseye)
  5. ################################################################
  6. ################################################################
  7. Running on yeqiang user
  8. ################################################################
  9. ################################################################
  10. Repo already cloned, using it as install directory
  11. ################################################################
  12. ################################################################
  13. Create and activate python venv
  14. ################################################################
  15. ################################################################
  16. Launching launch.py...
  17. ################################################################
  18. Using TCMalloc: libtcmalloc_minimal.so.4
  19. Python 3.10.6 | packaged by conda-forge | (main, Aug 22 2022, 20:36:39) [GCC 10.4.0]
  20. Version: v1.4.0
  21. Commit hash: 394ffa7b0a7fff3ec484bcd084e673a8b301ccc8
  22. Installing gfpgan
  23. Traceback (most recent call last):
  24. File "/home/yeqiang/Downloads/ai/stable-diffusion-webui/launch.py", line 38, in <module>
  25. main()
  26. File "/home/yeqiang/Downloads/ai/stable-diffusion-webui/launch.py", line 29, in main
  27. prepare_environment()
  28. File "/home/yeqiang/Downloads/ai/stable-diffusion-webui/modules/launch_utils.py", line 274, in prepare_environment
  29. run_pip(f"install {gfpgan_package}", "gfpgan")
  30. File "/home/yeqiang/Downloads/ai/stable-diffusion-webui/modules/launch_utils.py", line 130, in run_pip
  31. return run(f'"{python}" -m pip {command} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}", live=live)
  32. File "/home/yeqiang/Downloads/ai/stable-diffusion-webui/modules/launch_utils.py", line 107, in run
  33. raise RuntimeError("\n".join(error_bits))
  34. RuntimeError: Couldn't install gfpgan.
  35. Command: "/home/yeqiang/Downloads/ai/stable-diffusion-webui/venv/bin/python3" -m pip install https://github.com/TencentARC/GFPGAN/archive/8d2447a2d918f8eba5a4a01463fd48e45126a379.zip --prefer-binary
  36. Error code: 1
  37. stdout: Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
  38. Collecting https://github.com/TencentARC/GFPGAN/archive/8d2447a2d918f8eba5a4a01463fd48e45126a379.zip
  39. Using cached https://github.com/TencentARC/GFPGAN/archive/8d2447a2d918f8eba5a4a01463fd48e45126a379.zip (6.0 MB)
  40. Preparing metadata (setup.py): started
  41. Preparing metadata (setup.py): finished with status 'done'
  42. Collecting basicsr>=1.4.2
  43. Using cached https://pypi.tuna.tsinghua.edu.cn/packages/86/41/00a6b000f222f0fa4c6d9e1d6dcc9811a374cabb8abb9d408b77de39648c/basicsr-1.4.2.tar.gz (172 kB)
  44. Preparing metadata (setup.py): started
  45. Preparing metadata (setup.py): finished with status 'done'
  46. Collecting facexlib>=0.2.5
  47. Using cached https://pypi.tuna.tsinghua.edu.cn/packages/36/7b/2147339dafe1c4800514c9c21ee4444f8b419ce51dfc7695220a8e0069a6/facexlib-0.3.0-py3-none-any.whl (59 kB)
  48. Collecting lmdb
  49. 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)
  50. Requirement already satisfied: numpy in ./venv/lib/python3.10/site-packages (from gfpgan==1.3.5) (1.25.0)
  51. Collecting opencv-python
  52. 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)
  53. Collecting pyyaml
  54. 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)
  55. Collecting scipy
  56. 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)
  57. 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
  58. ERROR: Could not find a version that satisfies the requirement tb-nightly (from gfpgan) (from versions: none)
  59. ERROR: No matching distribution found for tb-nightly
  60. [notice] A new release of pip available: 22.2.1 -> 23.1.2
  61. [notice] To update, run: pip install --upgrade pip

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

日志

  1. (stable-diffusion-webui) yeqiang@yeqiang-MS-7B23:~/Downloads/ai/stable-diffusion-webui$ ./webui.sh
  2. ################################################################
  3. Install script for stable-diffusion + Web UI
  4. Tested on Debian 11 (Bullseye)
  5. ################################################################
  6. ################################################################
  7. Running on yeqiang user
  8. ################################################################
  9. ################################################################
  10. Repo already cloned, using it as install directory
  11. ################################################################
  12. ################################################################
  13. Create and activate python venv
  14. ################################################################
  15. ################################################################
  16. Launching launch.py...
  17. ################################################################
  18. Using TCMalloc: libtcmalloc_minimal.so.4
  19. Python 3.10.6 | packaged by conda-forge | (main, Aug 22 2022, 20:36:39) [GCC 10.4.0]
  20. Version: v1.4.0
  21. Commit hash: 394ffa7b0a7fff3ec484bcd084e673a8b301ccc8
  22. Installing gfpgan
  23. Installing clip
  24. Installing open_clip
  25. Cloning Stable Diffusion into /home/yeqiang/Downloads/ai/stable-diffusion-webui/repositories/stable-diffusion-stability-ai...
  26. Cloning K-diffusion into /home/yeqiang/Downloads/ai/stable-diffusion-webui/repositories/k-diffusion...
  27. Cloning CodeFormer into /home/yeqiang/Downloads/ai/stable-diffusion-webui/repositories/CodeFormer...
  28. Cloning BLIP into /home/yeqiang/Downloads/ai/stable-diffusion-webui/repositories/BLIP...
  29. Installing requirements for CodeFormer
  30. Installing requirements
  31. Traceback (most recent call last):
  32. File "/home/yeqiang/Downloads/ai/stable-diffusion-webui/launch.py", line 38, in <module>
  33. main()
  34. File "/home/yeqiang/Downloads/ai/stable-diffusion-webui/launch.py", line 29, in main
  35. prepare_environment()
  36. File "/home/yeqiang/Downloads/ai/stable-diffusion-webui/modules/launch_utils.py", line 309, in prepare_environment
  37. run_pip(f"install -r \"{requirements_file}\"", "requirements")
  38. File "/home/yeqiang/Downloads/ai/stable-diffusion-webui/modules/launch_utils.py", line 130, in run_pip
  39. return run(f'"{python}" -m pip {command} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}", live=live)
  40. File "/home/yeqiang/Downloads/ai/stable-diffusion-webui/modules/launch_utils.py", line 107, in run
  41. raise RuntimeError("\n".join(error_bits))
  42. RuntimeError: Couldn't install requirements.
  43. Command: "/home/yeqiang/Downloads/ai/stable-diffusion-webui/venv/bin/python3" -m pip install -r "requirements_versions.txt" --prefer-binary
  44. Error code: 1
  45. stdout: Collecting GitPython==3.1.30
  46. Downloading GitPython-3.1.30-py3-none-any.whl (184 kB)
  47. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 184.0/184.0 kB 70.5 kB/s eta 0:00:00
  48. Collecting Pillow==9.5.0
  49. Using cached Pillow-9.5.0-cp310-cp310-manylinux_2_28_x86_64.whl (3.4 MB)
  50. Collecting accelerate==0.18.0
  51. Downloading accelerate-0.18.0-py3-none-any.whl (215 kB)
  52. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 215.3/215.3 kB 18.6 kB/s eta 0:00:00
  53. Requirement already satisfied: basicsr==1.4.2 in ./venv/lib/python3.10/site-packages (from -r requirements_versions.txt (line 4)) (1.4.2)
  54. Collecting blendmodes==2022
  55. Downloading blendmodes-2022-py3-none-any.whl (10 kB)
  56. Collecting clean-fid==0.1.35
  57. Downloading clean_fid-0.1.35-py3-none-any.whl (26 kB)
  58. Collecting einops==0.4.1
  59. Downloading einops-0.4.1-py3-none-any.whl (28 kB)
  60. Collecting fastapi==0.94.0
  61. Downloading fastapi-0.94.0-py3-none-any.whl (56 kB)
  62. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 56.3/56.3 kB 8.2 kB/s eta 0:00:00
  63. Collecting gfpgan==1.3.8
  64. Using cached gfpgan-1.3.8-py3-none-any.whl (52 kB)
  65. Collecting gradio==3.32.0
  66. Downloading gradio-3.32.0-py3-none-any.whl (19.9 MB)
  67. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 19.9/19.9 MB 10.3 kB/s eta 0:00:00
  68. Collecting httpcore<=0.15
  69. Downloading httpcore-0.15.0-py3-none-any.whl (68 kB)
  70. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 68.4/68.4 kB 9.1 kB/s eta 0:00:00
  71. Collecting inflection==0.5.1
  72. Downloading inflection-0.5.1-py2.py3-none-any.whl (9.5 kB)
  73. Collecting jsonmerge==1.8.0
  74. Downloading jsonmerge-1.8.0.tar.gz (26 kB)
  75. Preparing metadata (setup.py): started
  76. Preparing metadata (setup.py): finished with status 'done'
  77. Collecting kornia==0.6.7
  78. Downloading kornia-0.6.7-py2.py3-none-any.whl (565 kB)
  79. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 565.1/565.1 kB 8.3 kB/s eta 0:00:00
  80. Collecting lark==1.1.2
  81. Downloading lark-1.1.2-py2.py3-none-any.whl (104 kB)
  82. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 104.7/104.7 kB 10.3 kB/s eta 0:00:00
  83. Collecting numpy==1.23.5
  84. Using cached numpy-1.23.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.1 MB)
  85. Collecting omegaconf==2.2.3
  86. Downloading omegaconf-2.2.3-py3-none-any.whl (79 kB)
  87. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 79.3/79.3 kB 9.9 kB/s eta 0:00:00
  88. Collecting piexif==1.1.3
  89. Downloading piexif-1.1.3-py2.py3-none-any.whl (20 kB)
  90. Collecting psutil~=5.9.5
  91. 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)
  92. Collecting pytorch_lightning==1.9.4
  93. Downloading pytorch_lightning-1.9.4-py3-none-any.whl (827 kB)
  94. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 827.8/827.8 kB 10.5 kB/s eta 0:00:00
  95. Collecting realesrgan==0.3.0
  96. Downloading realesrgan-0.3.0-py3-none-any.whl (26 kB)
  97. Collecting resize-right==0.0.2
  98. Downloading resize_right-0.0.2-py3-none-any.whl (8.9 kB)
  99. Collecting safetensors==0.3.1
  100. Downloading safetensors-0.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB)
  101. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.3/1.3 MB 9.5 kB/s eta 0:00:00
  102. Collecting scikit-image==0.20.0
  103. Downloading scikit_image-0.20.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.2 MB)
  104. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 13.2/13.2 MB 9.9 kB/s eta 0:00:00
  105. Collecting timm==0.6.7
  106. Downloading timm-0.6.7-py3-none-any.whl (509 kB)
  107. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 510.0/510.0 kB 7.9 kB/s eta 0:00:00
  108. Collecting tomesd==0.1.2
  109. Downloading tomesd-0.1.2-py3-none-any.whl (11 kB)
  110. Requirement already satisfied: torch in ./venv/lib/python3.10/site-packages (from -r requirements_versions.txt (line 27)) (2.0.1+cu118)
  111. Collecting torchdiffeq==0.2.3
  112. Downloading torchdiffeq-0.2.3-py3-none-any.whl (31 kB)
  113. Collecting torchsde==0.2.5
  114. Downloading torchsde-0.2.5-py3-none-any.whl (59 kB)
  115. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 59.2/59.2 kB 8.5 kB/s eta 0:00:00
  116. Collecting transformers==4.25.1
  117. Downloading transformers-4.25.1-py3-none-any.whl (5.8 MB)
  118. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.8/5.8 MB 9.3 kB/s eta 0:00:00
  119. Collecting gitdb<5,>=4.0.1
  120. Downloading gitdb-4.0.10-py3-none-any.whl (62 kB)
  121. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.7/62.7 kB 7.2 kB/s eta 0:00:00
  122. Requirement already satisfied: pyyaml in ./venv/lib/python3.10/site-packages (from accelerate==0.18.0->-r requirements_versions.txt (line 3)) (6.0)
  123. 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)
  124. 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)
  125. 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)
  126. 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)
  127. 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)
  128. 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)
  129. 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)
  130. 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)
  131. 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)
  132. 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)
  133. 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)
  134. Collecting aenum<4,>=3.1.7
  135. Downloading aenum-3.1.15-py3-none-any.whl (137 kB)
  136. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 137.6/137.6 kB 8.7 kB/s eta 0:00:00
  137. Collecting deprecation<3,>=2.1.0
  138. Downloading deprecation-2.1.0-py2.py3-none-any.whl (11 kB)
  139. Collecting starlette<0.27.0,>=0.26.0
  140. Downloading starlette-0.26.1-py3-none-any.whl (66 kB)
  141. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 66.9/66.9 kB 6.0 kB/s eta 0:00:00
  142. Collecting pydantic!=1.7,!=1.7.1,!=1.7.2,!=1.7.3,!=1.8,!=1.8.1,<2.0.0,>=1.6.2
  143. Downloading pydantic-1.10.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB)
  144. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.1/3.1 MB 10.0 kB/s eta 0:00:00
  145. 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)
  146. Collecting orjson
  147. Downloading orjson-3.9.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (136 kB)
  148. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 137.0/137.0 kB 8.6 kB/s eta 0:00:00
  149. Collecting httpx
  150. Downloading httpx-0.24.1-py3-none-any.whl (75 kB)
  151. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 75.4/75.4 kB 7.6 kB/s eta 0:00:00
  152. Collecting ffmpy
  153. Downloading ffmpy-0.3.0.tar.gz (4.8 kB)
  154. Preparing metadata (setup.py): started
  155. Preparing metadata (setup.py): finished with status 'done'
  156. Collecting markdown-it-py[linkify]>=2.0.0
  157. Downloading markdown_it_py-3.0.0-py3-none-any.whl (87 kB)
  158. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 87.5/87.5 kB 9.5 kB/s eta 0:00:00
  159. 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)
  160. Collecting aiohttp
  161. Downloading aiohttp-3.8.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB)
  162. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.0/1.0 MB 6.3 kB/s eta 0:00:00
  163. 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)
  164. Collecting gradio-client>=0.2.4
  165. Downloading gradio_client-0.2.7-py3-none-any.whl (288 kB)
  166. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 288.4/288.4 kB 8.7 kB/s eta 0:00:00
  167. 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)
  168. Collecting aiofiles
  169. Downloading aiofiles-23.1.0-py3-none-any.whl (14 kB)
  170. Collecting semantic-version
  171. Downloading semantic_version-2.10.0-py2.py3-none-any.whl (15 kB)
  172. Collecting pygments>=2.12.0
  173. Downloading Pygments-2.15.1-py3-none-any.whl (1.1 MB)
  174. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 7.3 kB/s eta 0:00:00
  175. Collecting pydub
  176. Downloading pydub-0.25.1-py2.py3-none-any.whl (32 kB)
  177. Collecting pandas
  178. Downloading pandas-2.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.3 MB)
  179. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.3/12.3 MB 8.2 kB/s eta 0:00:00
  180. 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)
  181. 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)
  182. Collecting websockets>=10.0
  183. 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)
  184. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 129.9/129.9 kB 5.7 kB/s eta 0:00:00
  185. Collecting uvicorn>=0.14.0
  186. Downloading uvicorn-0.22.0-py3-none-any.whl (58 kB)
  187. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.3/58.3 kB 5.9 kB/s eta 0:00:00
  188. Collecting python-multipart
  189. Downloading python_multipart-0.0.6-py3-none-any.whl (45 kB)
  190. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 45.7/45.7 kB 8.0 kB/s eta 0:00:00
  191. Collecting mdit-py-plugins<=0.3.3
  192. Downloading mdit_py_plugins-0.3.3-py3-none-any.whl (50 kB)
  193. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 50.5/50.5 kB 8.9 kB/s eta 0:00:00
  194. Collecting altair>=4.2.0
  195. Downloading altair-5.0.1-py3-none-any.whl (471 kB)
  196. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 471.5/471.5 kB 9.1 kB/s eta 0:00:00
  197. Collecting jsonschema
  198. Downloading jsonschema-4.17.3-py3-none-any.whl (90 kB)
  199. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 90.4/90.4 kB 8.1 kB/s eta 0:00:00
  200. Collecting antlr4-python3-runtime==4.9.*
  201. Downloading antlr4-python3-runtime-4.9.3.tar.gz (117 kB)
  202. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 117.0/117.0 kB 6.0 kB/s eta 0:00:00
  203. Preparing metadata (setup.py): started
  204. Preparing metadata (setup.py): finished with status 'done'
  205. 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)
  206. Collecting torchmetrics>=0.7.0
  207. Downloading torchmetrics-0.11.4-py3-none-any.whl (519 kB)
  208. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 519.2/519.2 kB 8.1 kB/s eta 0:00:00
  209. Collecting lightning-utilities>=0.6.0.post0
  210. Downloading lightning_utilities-0.9.0-py3-none-any.whl (23 kB)
  211. 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)
  212. 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)
  213. 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)
  214. 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)
  215. 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)
  216. Collecting boltons>=20.2.1
  217. Downloading boltons-23.0.0-py2.py3-none-any.whl (194 kB)
  218. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 194.8/194.8 kB 7.5 kB/s eta 0:00:00
  219. Collecting trampoline>=0.1.2
  220. Downloading trampoline-0.1.2-py3-none-any.whl (5.2 kB)
  221. INFO: pip is looking at multiple versions of torchsde to determine which version is compatible with other requirements. This could take a while.
  222. INFO: pip is looking at multiple versions of torchdiffeq to determine which version is compatible with other requirements. This could take a while.
  223. INFO: pip is looking at multiple versions of tomesd to determine which version is compatible with other requirements. This could take a while.
  224. INFO: pip is looking at multiple versions of timm to determine which version is compatible with other requirements. This could take a while.
  225. INFO: pip is looking at multiple versions of scikit-image to determine which version is compatible with other requirements. This could take a while.
  226. INFO: pip is looking at multiple versions of safetensors to determine which version is compatible with other requirements. This could take a while.
  227. INFO: pip is looking at multiple versions of resize-right to determine which version is compatible with other requirements. This could take a while.
  228. INFO: pip is looking at multiple versions of realesrgan to determine which version is compatible with other requirements. This could take a while.
  229. INFO: pip is looking at multiple versions of pytorch-lightning to determine which version is compatible with other requirements. This could take a while.
  230. INFO: pip is looking at multiple versions of piexif to determine which version is compatible with other requirements. This could take a while.
  231. INFO: pip is looking at multiple versions of omegaconf to determine which version is compatible with other requirements. This could take a while.
  232. INFO: pip is looking at multiple versions of numpy to determine which version is compatible with other requirements. This could take a while.
  233. INFO: pip is looking at multiple versions of lark to determine which version is compatible with other requirements. This could take a while.
  234. INFO: pip is looking at multiple versions of kornia to determine which version is compatible with other requirements. This could take a while.
  235. INFO: pip is looking at multiple versions of jsonmerge to determine which version is compatible with other requirements. This could take a while.
  236. INFO: pip is looking at multiple versions of inflection to determine which version is compatible with other requirements. This could take a while.
  237. INFO: pip is looking at multiple versions of gradio to determine which version is compatible with other requirements. This could take a while.
  238. INFO: pip is looking at multiple versions of gfpgan to determine which version is compatible with other requirements. This could take a while.
  239. INFO: pip is looking at multiple versions of fastapi to determine which version is compatible with other requirements. This could take a while.
  240. INFO: pip is looking at multiple versions of einops to determine which version is compatible with other requirements. This could take a while.
  241. INFO: pip is looking at multiple versions of clean-fid to determine which version is compatible with other requirements. This could take a while.
  242. INFO: pip is looking at multiple versions of blendmodes to determine which version is compatible with other requirements. This could take a while.
  243. INFO: pip is looking at multiple versions of basicsr to determine which version is compatible with other requirements. This could take a while.
  244. Collecting basicsr==1.4.2
  245. Using cached basicsr-1.4.2.tar.gz (172 kB)
  246. Preparing metadata (setup.py): started
  247. Preparing metadata (setup.py): finished with status 'done'
  248. INFO: pip is looking at multiple versions of accelerate to determine which version is compatible with other requirements. This could take a while.
  249. INFO: pip is looking at multiple versions of pillow to determine which version is compatible with other requirements. This could take a while.
  250. 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.
  251. INFO: pip is looking at multiple versions of gitpython to determine which version is compatible with other requirements. This could take a while.
  252. 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/
  253. 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/
  254. 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/
  255. 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/
  256. 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/
  257. ERROR: Could not find a version that satisfies the requirement tokenizers!=0.11.3,<0.14,>=0.11.1 (from transformers) (from versions: none)
  258. ERROR: No matching distribution found for tokenizers!=0.11.3,<0.14,>=0.11.1
  259. [notice] A new release of pip available: 22.2.1 -> 23.1.2
  260. [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

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

驱动不匹配

  1. (stable-diffusion-webui) yeqiang@yeqiang-MS-7B23:~/Downloads/ai/stable-diffusion-webui$ nvidia-smi
  2. Failed to initialize NVML: Driver/library version mismatch
  3. (stable-diffusion-webui) yeqiang@yeqiang-MS-7B23:~/Downloads/ai/stable-diffusion-webui$ cat /sys/module/nvidia/version
  4. 520.61.05
  5. (stable-diffusion-webui) yeqiang@yeqiang-MS-7B23:~/Downloads/ai/stable-diffusion-webui$ cat /proc/driver/nvidia/version
  6. NVRM version: NVIDIA UNIX x86_64 Kernel Module 520.61.05 Thu Sep 29 05:30:25 UTC 2022
  7. 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

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

闽ICP备14008679号