Mac部署stable diffusion,无法安装gfpgan


Installing gfpgan
Traceback (most recent call last):
  File "/Users/fufan/stable-diffusion-webui/launch.py", line 360, in <module>
    prepare_environment()
  File "/Users/fufan/stable-diffusion-webui/launch.py", line 275, in prepare_environment
    run_pip(f"install {gfpgan_package}", "gfpgan")
  File "/Users/fufan/stable-diffusion-webui/launch.py", line 137, in run_pip
    return run(f'"{python}" -m pip {args} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}")
  File "/Users/fufan/stable-diffusion-webui/launch.py", line 105, in run
    raise RuntimeError(message)
RuntimeError: Couldn't install gfpgan.
Command: "/opt/homebrew/opt/python@3.10/bin/python3.10" -m pip install git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 --prefer-binary
Error code: 1
stdout: Collecting git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379
  Cloning https://github.com/TencentARC/GFPGAN.git (to revision 8d2447a2d918f8eba5a4a01463fd48e45126a379) to /private/var/folders/x0/rnf2t9196yq9zd715b0w6sbc0000gn/T/pip-req-build-szobu6j7

stderr:   Running command git clone --filter=blob:none --quiet https://github.com/TencentARC/GFPGAN.git /private/var/folders/x0/rnf2t9196yq9zd715b0w6sbc0000gn/T/pip-req-build-szobu6j7
  致命错误:无法访问 'https://github.com/TencentARC/GFPGAN.git/':error:02FFF03C:system library:func(4095):Operation timed out
  致命错误:无法从承诺者远程获取 fa702eeacff13fe8475b0e102a8b8c37602f3963
  警告:克隆成功,但是检出失败。
  您可以通过 'git status' 检查哪些已被检出,然后使用命令
  'git restore --source=HEAD :/' 重试

  error: subprocess-exited-with-error
  
  × git clone --filter=blob:none --quiet https://github.com/TencentARC/GFPGAN.git /private/var/folders/x0/rnf2t9196yq9zd715b0w6sbc0000gn/T/pip-req-build-szobu6j7 did not run successfully.exit code: 128
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× git clone --filter=blob:none --quiet https://github.com/TencentARC/GFPGAN.git /private/var/folders/x0/rnf2t9196yq9zd715b0w6sbc0000gn/T/pip-req-build-szobu6j7 did not run successfully.exit code: 128
╰─> See above for output.

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

人已经懵了;https://stable-diffusion-art.com/install-mac/%E6%88%91%E5%8F%82%E8%80%83%E7%9A%84%E6%98%AF%E8%BF%99%E4%B8%80%E7%AF%87%E5%9B%BD%E5%A4%96%E7%9A%84%E6%95%99%E7%A8%8B%EF%BC%9B%E7%84%B6%E5%90%8E%E6%AF%8F%E6%AC%A1%E5%88%B0cd ~/stable-diffusion-webui;./webui.sh 这一部的时候就会出现上面无法安装gfpgan的错误,我一小白粗看代码好像是没法链接上github,我有使用vpn外网正常能上,也改了DNS 8.8.8.8,都没有用!
有大神知道这是咋回事吗,万分感谢

想更快速实现 Stable Diffusion 模型的AI-Web应用,可以尝试云端资源进行部署。
云端部署的优势在于:
● 省心。不需要担心电脑配置,云上的资源就是你的资源。
● 简便。基于封装好的镜像直接拉起,省去繁琐的环境配置工作。
● 弹性。按需使用,弹性扩缩容。

最近,阿里云机器学习平PAI 推出了 Stable Diffusion 文生图模型 的系列教程,可以让感兴趣的开发者极简地体验到SD WebUI部署、SD微调训练的过程。
【入门:SD WebUI 低代码部署】https://help.aliyun.com/document_detail/610074.html
【入门:SD WebUI notebook 开发部署】https://help.aliyun.com/document_detail/2261127.htm?
【进阶:SD 文生图Lora模型微调实现虚拟上装】https://help.aliyun.com/document_detail/615220.htm?

最近有个福利,机器学习平台PAI推出了免费试用活动,这些实验都可以通过免费的云上GPU来实现。前往领取福利戳 👉🏻 https://free.aliyun.com/?product=9602825&tlog=0620csdnwz

该回答引用GPTᴼᴾᴱᴺᴬᴵ
根据输出信息看起来是由于网络问题,无法从Github上克隆GFPGAN库的代码导致的安装失败。可能的解决方案包括:

1.确保网络连接正常,可以尝试重新运行安装命令,也可以尝试使用其他网络环境进行安装。
2.如果网络连接正常,但是仍然无法克隆代码,可以尝试手动从Github上下载GFPGAN的代码,并将其放置在正确的目录下,然后再运行安装命令。
3.可以尝试使用国内的Git镜像站点,例如使用gitee.com代替github.com进行克隆。可以在命令行中指定镜像站点的URL,例如:

git clone --filter=blob:none --quiet https://gitee.com/TencentARC/GFPGAN.git /private/var/folders/x0/rnf2t9196yq9zd715b0w6sbc0000gn/T/pip-req-build-szobu6j7


4.如果以上方法都无法解决问题,可以尝试联系GFPGAN项目的维护者,或者在项目的Github页面上提出issue,寻求帮助。