当前位置:   article > 正文

安装stable diffusion报错_stable diffusion model failed to load

stable diffusion model failed to load

安装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/ 
  • 1
  • 2
  • 3
  • 4
  • 5

以下为具体的报错内容

➜  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) (2.0.1)
Requirement already satisfied: torchvision in ./venv/lib/python3.10/site-packages (from gfpgan==1.3.5) (0.15.2)
Requirement already satisfied: tqdm in ./venv/lib/python3.10/site-packages (from gfpgan==1.3.5) (4.66.1)
Requirement already satisfied: yapf in ./venv/lib/python3.10/site-packages (from gfpgan==1.3.5) (0.40.2)
Requirement already satisfied: requests in ./venv/lib/python3.10/site-packages (from basicsr>=1.4.2->gfpgan==1.3.5) (2.31.0)
Requirement already satisfied: addict in ./venv/lib/python3.10/site-packages (from basicsr>=1.4.2->gfpgan==1.3.5) (2.4.0)
Requirement already satisfied: Pillow in ./venv/lib/python3.10/site-packages (from basicsr>=1.4.2->gfpgan==1.3.5) (10.1.0)
Requirement already satisfied: future in ./venv/lib/python3.10/site-packages (from basicsr>=1.4.2->gfpgan==1.3.5) (0.18.3)
Requirement already satisfied: scikit-image in ./venv/lib/python3.10/site-packages (from basicsr>=1.4.2->gfpgan==1.3.5) (0.22.0)
Requirement already satisfied: filterpy in ./venv/lib/python3.10/site-packages (from facexlib>=0.2.5->gfpgan==1.3.5) (1.4.5)
Requirement already satisfied: numba in ./venv/lib/python3.10/site-packages (from facexlib>=0.2.5->gfpgan==1.3.5) (0.58.1)
Requirement already satisfied: typing-extensions in ./venv/lib/python3.10/site-packages (from torch>=1.7->gfpgan==1.3.5) (4.8.0)
Requirement already satisfied: networkx in ./venv/lib/python3.10/site-packages (from torch>=1.7->gfpgan==1.3.5) (3.2.1)
Requirement already satisfied: sympy in ./venv/lib/python3.10/site-packages (from torch>=1.7->gfpgan==1.3.5) (1.12)
Requirement already satisfied: filelock in ./venv/lib/python3.10/site-packages (from torch>=1.7->gfpgan==1.3.5) (3.13.1)
Requirement already satisfied: jinja2 in ./venv/lib/python3.10/site-packages (from torch>=1.7->gfpgan==1.3.5) (3.1.2)
Requirement already satisfied: tf-keras-nightly in ./venv/lib/python3.10/site-packages (from tb-nightly->gfpgan==1.3.5) (2.16.0.dev2023120910)
Requirement already satisfied: protobuf>=3.19.6 in ./venv/lib/python3.10/site-packages (from tb-nightly->gfpgan==1.3.5) (4.25.1)
Requirement already satisfied: werkzeug>=1.0.1 in ./venv/lib/python3.10/site-packages (from tb-nightly->gfpgan==1.3.5) (3.0.1)
Requirement already satisfied: setuptools>=41.0.0 in ./venv/lib/python3.10/site-packages (from tb-nightly->gfpgan==1.3.5) (58.1.0)
Requirement already satisfied: grpcio>=1.48.2 in ./venv/lib/python3.10/site-packages (from tb-nightly->gfpgan==1.3.5) (1.60.0)
Requirement already satisfied: six>1.9 in ./venv/lib/python3.10/site-packages (from tb-nightly->gfpgan==1.3.5) (1.16.0)
Requirement already satisfied: tensorboard-data-server<0.8.0,>=0.7.0 in ./venv/lib/python3.10/site-packages (from tb-nightly->gfpgan==1.3.5) (0.7.2)
Requirement already satisfied: google-auth<3,>=1.6.3 in ./venv/lib/python3.10/site-packages (from tb-nightly->gfpgan==1.3.5) (2.25.2)
Requirement already satisfied: markdown>=2.6.8 in ./venv/lib/python3.10/site-packages (from tb-nightly->gfpgan==1.3.5) (3.5.1)
Requirement already satisfied: google-auth-oauthlib<2,>=0.5 in ./venv/lib/python3.10/site-packages (from tb-nightly->gfpgan==1.3.5) (1.1.0)
Requirement already satisfied: absl-py>=0.4 in ./venv/lib/python3.10/site-packages (from tb-nightly->gfpgan==1.3.5) (2.0.0)
Requirement already satisfied: platformdirs>=3.5.1 in ./venv/lib/python3.10/site-packages (from yapf->gfpgan==1.3.5) (4.1.0)
Requirement already satisfied: importlib-metadata>=6.6.0 in ./venv/lib/python3.10/site-packages (from yapf->gfpgan==1.3.5) (7.0.0)
Requirement already satisfied: tomli>=2.0.1 in ./venv/lib/python3.10/site-packages (from yapf->gfpgan==1.3.5) (2.0.1)
Requirement already satisfied: rsa<5,>=3.1.4 in ./venv/lib/python3.10/site-packages (from google-auth<3,>=1.6.3->tb-nightly->gfpgan==1.3.5) (4.9)
Requirement already satisfied: pyasn1-modules>=0.2.1 in ./venv/lib/python3.10/site-packages (from google-auth<3,>=1.6.3->tb-nightly->gfpgan==1.3.5) (0.3.0)
Requirement already satisfied: cachetools<6.0,>=2.0.0 in ./venv/lib/python3.10/site-packages (from google-auth<3,>=1.6.3->tb-nightly->gfpgan==1.3.5) (5.3.2)
Requirement already satisfied: requests-oauthlib>=0.7.0 in ./venv/lib/python3.10/site-packages (from google-auth-oauthlib<2,>=0.5->tb-nightly->gfpgan==1.3.5) (1.3.1)
Requirement already satisfied: zipp>=0.5 in ./venv/lib/python3.10/site-packages (from importlib-metadata>=6.6.0->yapf->gfpgan==1.3.5) (3.17.0)
Requirement already satisfied: charset-normalizer<4,>=2 in ./venv/lib/python3.10/site-packages (from requests->basicsr>=1.4.2->gfpgan==1.3.5) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in ./venv/lib/python3.10/site-packages (from requests->basicsr>=1.4.2->gfpgan==1.3.5) (3.6)
Requirement already satisfied: certifi>=2017.4.17 in ./venv/lib/python3.10/site-packages (from requests->basicsr>=1.4.2->gfpgan==1.3.5) (2023.11.17)
Requirement already satisfied: urllib3<3,>=1.21.1 in ./venv/lib/python3.10/site-packages (from requests->basicsr>=1.4.2->gfpgan==1.3.5) (2.1.0)
Requirement already satisfied: MarkupSafe>=2.1.1 in ./venv/lib/python3.10/site-packages (from werkzeug>=1.0.1->tb-nightly->gfpgan==1.3.5) (2.1.3)
Requirement already satisfied: matplotlib in ./venv/lib/python3.10/site-packages (from filterpy->facexlib>=0.2.5->gfpgan==1.3.5) (3.8.2)
Requirement already satisfied: llvmlite<0.42,>=0.41.0dev0 in ./venv/lib/python3.10/site-packages (from numba->facexlib>=0.2.5->gfpgan==1.3.5) (0.41.1)
Requirement already satisfied: packaging>=21 in ./venv/lib/python3.10/site-packages (from scikit-image->basicsr>=1.4.2->gfpgan==1.3.5) (23.2)
Requirement already satisfied: imageio>=2.27 in ./venv/lib/python3.10/site-packages (from scikit-image->basicsr>=1.4.2->gfpgan==1.3.5) (2.33.0)
Requirement already satisfied: lazy_loader>=0.3 in ./venv/lib/python3.10/site-packages (from scikit-image->basicsr>=1.4.2->gfpgan==1.3.5) (0.3)
Requirement already satisfied: tifffile>=2022.8.12 in ./venv/lib/python3.10/site-packages (from scikit-image->basicsr>=1.4.2->gfpgan==1.3.5) (2023.9.26)
Requirement already satisfied: mpmath>=0.19 in ./venv/lib/python3.10/site-packages (from sympy->torch>=1.7->gfpgan==1.3.5) (1.3.0)
Requirement already satisfied: pyasn1<0.6.0,>=0.4.6 in ./venv/lib/python3.10/site-packages (from pyasn1-modules>=0.2.1->google-auth<3,>=1.6.3->tb-nightly->gfpgan==1.3.5) (0.5.1)
Requirement already satisfied: oauthlib>=3.0.0 in ./venv/lib/python3.10/site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<2,>=0.5->tb-nightly->gfpgan==1.3.5) (3.2.2)
Requirement already satisfied: pyparsing>=2.3.1 in ./venv/lib/python3.10/site-packages (from matplotlib->filterpy->facexlib>=0.2.5->gfpgan==1.3.5) (3.1.1)
Requirement already satisfied: cycler>=0.10 in ./venv/lib/python3.10/site-packages (from matplotlib->filterpy->facexlib>=0.2.5->gfpgan==1.3.5) (0.12.1)
Requirement already satisfied: fonttools>=4.22.0 in ./venv/lib/python3.10/site-packages (from matplotlib->filterpy->facexlib>=0.2.5->gfpgan==1.3.5) (4.46.0)
Requirement already satisfied: contourpy>=1.0.1 in ./venv/lib/python3.10/site-packages (from matplotlib->filterpy->facexlib>=0.2.5->gfpgan==1.3.5) (1.2.0)
Requirement already satisfied: kiwisolver>=1.3.1 in ./venv/lib/python3.10/site-packages (from matplotlib->filterpy->facexlib>=0.2.5->gfpgan==1.3.5) (1.4.5)
Requirement already satisfied: python-dateutil>=2.7 in ./venv/lib/python3.10/site-packages (from matplotlib->filterpy->facexlib>=0.2.5->gfpgan==1.3.5) (2.8.2)
Using legacy 'setup.py install' for gfpgan, since package 'wheel' is not installed.
Installing collected packages: gfpgan
  Running setup.py install for gfpgan: started
  Running setup.py install for gfpgan: finished with status 'error'

stderr:   error: subprocess-exited-with-error

  × Running setup.py install for gfpgan did not run successfully.
  │ exit code: 1
  ╰─> [29 lines of output]
      WARNING: The wheel package is not available.
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/xf/zm5xhx594g58t4r6n8d00hzr0000gp/T/pip-req-build-fp6vc_gs/setup.py", line 84, in <module>
          setup(
        File "/Users/hello/stable-diffusion-webui/venv/lib/python3.10/site-packages/setuptools/__init__.py", line 152, in setup
          _install_setup_requires(attrs)
        File "/Users/hello/stable-diffusion-webui/venv/lib/python3.10/site-packages/setuptools/__init__.py", line 147, in _install_setup_requires
          dist.fetch_build_eggs(dist.setup_requires)
        File "/Users/hello/stable-diffusion-webui/venv/lib/python3.10/site-packages/setuptools/dist.py", line 806, in fetch_build_eggs
          resolved_dists = pkg_resources.working_set.resolve(
        File "/Users/hello/stable-diffusion-webui/venv/lib/python3.10/site-packages/pkg_resources/__init__.py", line 766, in resolve
          dist = best[req.key] = env.best_match(
        File "/Users/hello/stable-diffusion-webui/venv/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1051, in best_match
          return self.obtain(req, installer)
        File "/Users/hello/stable-diffusion-webui/venv/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1063, in obtain
          return installer(requirement)
        File "/Users/hello/stable-diffusion-webui/venv/lib/python3.10/site-packages/setuptools/dist.py", line 877, in fetch_build_egg
          return fetch_build_egg(self, req)
        File "/Users/hello/stable-diffusion-webui/venv/lib/python3.10/site-packages/setuptools/installer.py", line 80, in fetch_build_egg
          wheel.install_as_egg(dist_location)
        File "/Users/hello/stable-diffusion-webui/venv/lib/python3.10/site-packages/setuptools/wheel.py", line 95, in install_as_egg
          self._install_as_egg(destination_eggdir, zf)
        File "/Users/hello/stable-diffusion-webui/venv/lib/python3.10/site-packages/setuptools/wheel.py", line 103, in _install_as_egg
          self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
        File "/Users/hello/stable-diffusion-webui/venv/lib/python3.10/site-packages/setuptools/wheel.py", line 124, in _convert_metadata
          os.mkdir(destination_eggdir)
      FileExistsError: [Errno 17] File exists: '/private/var/folders/xf/zm5xhx594g58t4r6n8d00hzr0000gp/T/pip-req-build-fp6vc_gs/.eggs/Cython-3.0.6-py3.10-macosx-10.9-universal2.egg'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> gfpgan

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
WARNING: You are using pip version 22.0.4; however, version 23.3.1 is available.
You should consider upgrading via the '/Users/hello/stable-diffusion-webui/venv/bin/python3.10 -m pip install --upgrade pip' command.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/凡人多烦事01/article/detail/227608
推荐阅读
相关标签
  

闽ICP备14008679号