【Mac安装stable-diffusion-webui报错解决方案】

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

Mac安装stable-diffusion-webui报错解决方案

python最好用3.10版本!!!
python最好用3.10版本!!!
python最好用3.10版本!!!

Mac升级Python版本

brew install python@3.10

Mac电脑从stable-diffusion-webui代码库clone后,按照提示运行
bash <(wget -qO- https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/webui.sh) 报错

报错信息汇总:

Installing gfpgan
Traceback (most recent call last):

RuntimeError: Couldn’t install gfpgan.

error: subprocess-exited-with-error
ERROR: Could not find a version that satisfies the requirement cython (from versions: none)
ERROR: No matching distribution found for cython
error: metadata-generation-failed

完整报错如下:

Python 3.10.10 (main, Feb 16 2023, 02:58:25) [Clang 14.0.0 (clang-1400.0.29.202)]
Commit hash: a9fed7c364061ae6efb37f797b6b522cb3cf7aa2
Installing gfpgan
Traceback (most recent call last):
  File "/Users/xxx/IdeaProjects/stable-diffusion-webui/launch.py", line 380, in <module>
    prepare_environment()
  File "/Users/xxx/IdeaProjects/stable-diffusion-webui/launch.py", line 290, in prepare_environment
    run_pip(f"install {gfpgan_package}", "gfpgan")
  File "/Users/xxx/IdeaProjects/stable-diffusion-webui/launch.py", line 145, 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/xxx/IdeaProjects/stable-diffusion-webui/launch.py", line 113, in run
    raise RuntimeError(message)
RuntimeError: Couldn't install gfpgan.
Command: "/usr/local/opt/python@3.10/bin/python3.10" -m pip install git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 --prefer-binary
Error code: 1
stdout: Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Collecting git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379
  Cloning https://github.com/TencentARC/GFPGAN.git (to revision 8d2447a2d918f8eba5a4a01463fd48e45126a379) to /private/var/folders/_m/tjc3x6fd5s5_f6cs_dqt4hx00000gn/T/pip-req-build-2jwucle4
  Resolved https://github.com/TencentARC/GFPGAN.git to commit 8d2447a2d918f8eba5a4a01463fd48e45126a379
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'

stderr:   Running command git clone --filter=blob:none --quiet https://github.com/TencentARC/GFPGAN.git /private/var/folders/_m/tjc3x6fd5s5_f6cs_dqt4hx00000gn/T/pip-req-build-2jwucle4
  Running command git rev-parse -q --verify 'sha^8d2447a2d918f8eba5a4a01463fd48e45126a379'
  Running command git fetch -q https://github.com/TencentARC/GFPGAN.git 8d2447a2d918f8eba5a4a01463fd48e45126a379
  Running command git checkout -q 8d2447a2d918f8eba5a4a01463fd48e45126a379
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [40 lines of output]
      /usr/local/lib/python3.10/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      WARNING: The repository located at mirrors.aliyun.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host mirrors.aliyun.com'.
      ERROR: Could not find a version that satisfies the requirement cython (from versions: none)
      ERROR: No matching distribution found for cython
      Traceback (most recent call last):
        File "/usr/local/lib/python3.10/site-packages/setuptools/installer.py", line 82, in fetch_build_egg
          subprocess.check_call(cmd)
        File "/usr/local/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 369, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['/usr/local/opt/python@3.10/bin/python3.10', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/var/folders/_m/tjc3x6fd5s5_f6cs_dqt4hx00000gn/T/tmpq8tsd1vj', '--quiet', 'cython']' returned non-zero exit status 1.

      The above exception was the direct cause of the following exception:

      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/_m/tjc3x6fd5s5_f6cs_dqt4hx00000gn/T/pip-req-build-2jwucle4/setup.py", line 84, in <module>
          setup(
        File "/usr/local/lib/python3.10/site-packages/setuptools/__init__.py", line 107, in setup
          _install_setup_requires(attrs)
        File "/usr/local/lib/python3.10/site-packages/setuptools/__init__.py", line 80, in _install_setup_requires
          _fetch_build_eggs(dist)
        File "/usr/local/lib/python3.10/site-packages/setuptools/__init__.py", line 85, in _fetch_build_eggs
          dist.fetch_build_eggs(dist.setup_requires)
        File "/usr/local/lib/python3.10/site-packages/setuptools/dist.py", line 879, in fetch_build_eggs
          resolved_dists = pkg_resources.working_set.resolve(
        File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 815, in resolve
          dist = self._resolve_dist(
        File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 851, in _resolve_dist
          dist = best[req.key] = env.best_match(
        File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1123, in best_match
          return self.obtain(req, installer)
        File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1135, in obtain
          return installer(requirement)
        File "/usr/local/lib/python3.10/site-packages/setuptools/dist.py", line 949, in fetch_build_egg
          return fetch_build_egg(self, req)
        File "/usr/local/lib/python3.10/site-packages/setuptools/installer.py", line 84, in fetch_build_egg
          raise DistutilsError(str(e)) from e
      distutils.errors.DistutilsError: Command '['/usr/local/opt/python@3.10/bin/python3.10', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/var/folders/_m/tjc3x6fd5s5_f6cs_dqt4hx00000gn/T/tmpq8tsd1vj', '--quiet', 'cython']' returned non-zero exit status 1.
      [end of output]

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

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

[notice] A new release of pip is available: 23.0 -> 23.0.1
[notice] To update, run: python3.10 -m pip install --upgrade pip

【Mac安装stable-diffusion-webui报错解决方案】

注意看标红的部分,提示阿里云的镜像不是受信任的,把它改成受信任的即可。执行下面的命令

pip config set global.trusted-host mirrors.aliyun.com

PS:如何设置阿里云镜像?执行下面的命令文章来源地址https://www.toymoban.com/news/detail-412656.html

pip config set global.index-url <http://mirrors.aliyun.com/pypi/simple/>

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

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

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

相关文章

  • Windows 10安装stable-diffusion-webui过程中出现报错解决如下

    最近使用win10在安装stable-diffusion-webui过程中,安装上图所示requirements.txt出现报错解决如下, ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: ‘C:babs_4f5wo627a3crootsrecipecertifi_1663615677642workcertifi’ 解决办法: 删除下图中的内容

    2024年02月11日
    浏览(46)
  • mac系统本地部署stable-diffusion-webui

    1.需要科学上网 2.电脑需要安装好homebrew 在需要的位置拉取源码 这里安装3.10.6, 按理来说只要高于这个版本应该都好使 1.下载模型 : https://civitai.com/ 2.把模型复制到需要放模型的目录, 例如我的: /Users/zijieyan/Downloads/stable-diffusion-webui/models/Stable-diffusion (要根据自己下载的源码位置

    2024年02月09日
    浏览(36)
  • 【Stable-Diffusion-WebUI】Windows系统安装Stable-Diffusion-WebUI

    基于 stable-diffusion 封装的 webui 开源项目,通过界面交互的方式来使用 stable-diffusion,降低了使用门槛,可以通过本地部署的方式进行访问,对电脑的配置要求较高,以下配置要求仅供参考 第一步:安装python3.10(这步可以跳过,3.8以上即可) 第二步:使用git下载stable diffusio

    2024年02月11日
    浏览(49)
  • stable-diffusion-webui 安装

    https://blog.csdn.net/weixin_72056722/article/details/126651703 卸载cpu版本的torch并离线安装对应的gpu版本 1、安装gpu ,速度从一小时加速到3分钟 torch 下载 https://download.pytorch.org/whl/torch_stable.html 1、 No matching distribution found for clip 国内没有,网路 2、 WARNING: Ignoring invalid distribution -ip 找到提示

    2024年02月13日
    浏览(47)
  • stable-diffusion-webui 本地部署git报错问题解决

    运行时python launch.py --autolaunch 产生Error code:1 由于git安全机制问题,导致项目读取不到相应的 stable-diffusion-stability-ai等插件 。 1:依次忽略相关文件夹: 2:直接使用 git bash 打开运行  

    2024年02月11日
    浏览(41)
  • stable-diffusion-webui 安装使用

    最近AI绘画很火,尝试一下 https://github.com/AUTOMATIC1111/stable-diffusion-webui 或者删除python 重新安装,在开始菜单可以找到python的快捷方式,删除对应的源文件夹 关闭翻墙软件 ‘Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check’\\\" 1.查驱动 nvidia-sm

    2024年01月18日
    浏览(64)
  • stable-diffusion-webui安装教程

    现在AI开始进入绘画领域,并且能自动根据文本来创建图片出来,这是一个划时代的进步。 这时候,我也不能落后,要紧跟上时代的步伐,那么也来学习一下stable-diffusion的使用,这样也算多一项对技术的认识,提高对AI的认知。 从网上看到很多stable-diffusion-webui的安装,其实

    2024年04月12日
    浏览(32)
  • stable-diffusion-webui 安装问题记录

    安装完成后,浏览器打开:http://127.0.0.1:7860/,无论点哪里,只要触发交互,都提示: 解决办法: 1、关闭(墙外魔法工具)软件(不一定有效) 2、需要不关魔法工具的环境下的话,可以修改webui-user.bat文件(Linux系统对应webui-user.sh),增加参数:–no-gradio-queue

    2024年02月13日
    浏览(33)
  • stable-diffusion-webui 快捷安装教程

    stable-diffusion-webui 是一个用来装载Stable Diffusion 模型的网页,可以方便的调用模型生成图片。 stable-diffusion-webui的github地址为:https://github.com/AUTOMATIC1111/stable-diffusion-webui 这个库的依赖很多,虽然代码里面有写安装依赖库的代码,但几乎都是国外资源,在国内网络环境下很难下

    2024年02月11日
    浏览(27)
  • stable-diffusion-webui 安装与运行

    大家好,我是水滴~~ 本文主要介绍在各种显卡环境中,如何安装和运行 stable-diffusion-webui,包括:在 NVIDIA 显卡环境上安装、在 AMD 显卡环境上安装、在集显或小于 4G 显卡环境上安装。 Stable Diffusion 对显卡有一定的要求,其支持的最小独立显存为 4G,8G 以上为优,越大越好。对

    2024年01月20日
    浏览(39)

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

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

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

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

二维码1

领取红包

二维码2

领红包