Bootstrap

安装stable diffusion报错

安装stable diffusion报错

总是报 RuntimeError: Couldn’t install gfpgan.
最终解决方案参照网络文章:https://zhuanlan.zhihu.com/p/608397859
设置了以下之后再重新运行就可以正常安装了

git config --global https.proxy http://127.0.0.1:7890

git config --global https.proxy https://127.0.0.1:7890

https://ghproxy.com/https://github.com/ 

以下为具体的报错内容

➜  stable-diffusion-webui-master ./webui.sh

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

################################################################
Running on hello user
################################################################

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

################################################################
Launching launch.py...
################################################################
Python 3.10.4 (v3.10.4:9d38120e33, Mar 23 2022, 17:29:05) [Clang 13.0.0 (clang-1300.0.29.30)]
Version: v1.5.1
Commit hash: 68f336bd994bed5442ad95bad6b6ad5564a5409a
Installing gfpgan
Traceback (most recent call last):
  File "/Users/hello/stable-diffusion-webui/launch.py", line 39, in <module>
    main()
  File "/Users/hello/stable-diffusion-webui/launch.py", line 30, in main
    prepare_environment()
  File "/Users/hello/stable-diffusion-webui/modules/launch_utils.py", line 320, in prepare_environment
    run_pip(f"install {
     gfpgan_package}", "gfpgan")
  File "/Users/hello/stable-diffusion-webui/modules/launch_utils.py", line 136, 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 "/Users/hello/stable-diffusion-webui/modules/launch_utils.py", line 113, in run
    raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't install gfpgan.
Command: "/Users/hello/stable-diffusion-webui/venv/bin/python3.10" -m pip install https://github.com/TencentARC/GFPGAN/archive/8d2447a2d918f8eba5a4a01463fd48e45126a379.zip --prefer-binary
Error code: 1
stdout: 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'
Requirement already satisfied: basicsr>=1.4.2 in ./venv/lib/python3.10/site-packages (from gfpgan==1.3.5) (1.4.2)
Requirement already satisfied: facexlib>=0.2.5 in ./venv/lib/python3.10/site-packages (from gfpgan==1.3.5) (0.3.0)
Requirement already satisfied: lmdb in ./venv/lib/python3.10/site-packages (from gfpgan==1.3.5) (1.4.1)
Requirement already satisfied: numpy in ./venv/lib/python3.10/site-packages (from gfpgan==1.3.5) (1.26.2)
Requirement already satisfied: opencv-python in ./venv/lib/python3.10/site-packages (from gfpgan==1.3.5) (4.8.1.78)
Requirement already satisfied: pyyaml in ./venv/lib/python3.10/site-packages (from gfpgan==1.3.5) (6.0.1)
Requirement already satisfied: scipy in ./venv/lib/python3.10/site-packages (from gfpgan==1.3.5) (1.11.4)
Requirement already satisfied: tb-nightly in ./venv/lib/python3.10/site-packages (from gfpgan==1.3.5) (2.16.0a20231209)
Requirement already satisfied: torch>=1.7 in ./venv/lib/python3.10/site-packages (from gfpgan==1.3.5) 
;