当前位置: 首页 > news >正文

MAC安装stable diffusion

./webui.sh --precision full --no-half-vae --disable-nan-check --api

Command: "/Users/xxxx/aigc/stable-diffusion-webui/venv/bin/python3" -m pip install torch==2.0.1 torchvision==0.15.2

Error code: 2

执行命令:

pip install torch==2.0.1 torchvision==0.15.2 -i https://pypi.tuna.tsinghua.edu.cn/simple

设置pip源:

pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

建议还是切换到:

pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/ 

任意文本编辑器打开webui根目录下的launch.py找到下列代码

gfpgan_package = os.environ.get('GFPGAN_PACKAGE', "git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379")

clip_package = os.environ.get('CLIP_PACKAGE', "git+https://github.com/openai/CLIP.git@d50d76daa670286dd6cacf3bcd80b5e4823fc8e1")

openclip_package = os.environ.get('OPENCLIP_PACKAGE', "git+https://github.com/mlfoundations/open_clip.git@bb6e834e9c70d9c27d0dc3ecedeebeaeb1ffad6b")

把那几个GitHub的源改成国内码云搬运的

gfpgan_package = os.environ.get('GFPGAN_PACKAGE', "git+https://gitee.com/gavinss1/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379")

clip_package = os.environ.get('CLIP_PACKAGE', "git+https://gitee.com/jerrylinkun/CLIP.git@d50d76daa670286dd6cacf3bcd80b5e4823fc8e1")

openclip_package = os.environ.get('OPENCLIP_PACKAGE', "git+https://gitee.com/ufhy/open_clip.git@bb6e834e9c70d9c27d0dc3ecedeebeaeb1ffad6b") 

错误:

stderr: ERROR: Could not find a version that satisfies the requirement tb-nightly (from versions: none)

ERROR: No matching distribution found for tb-nightly

 

发现这个错误直接切换pip源 

pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/ 

错误:

OSError: Can't load tokenizer for 'openai/clip-vit-large-patch14'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure 'openai/clip-vit-large-patch14' is the correct path to a directory containing all relevant files for a CLIPTokenizer tokenizer.

Failed to create model quickly; will retry using slow method.

'(MaxRetryError("HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /openai/clip-vit-large-patch14/resolve/main/vocab.json (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x15b3d0310>, 'Connection to huggingface.co timed out. (connect timeout=10)'))"), '(Request ID: c9ab7798-16e9-4ede-84bf-5c72056cc4ca)')' thrown while requesting HEAD https://huggingface.co/openai/clip-vit-large-patch14/resolve/main/vocab.json

这个错误是访问不了: huggingface.co; 需要科学上网

错误:

AttributeError: 'NoneType' object has no attribute 'cond_stage_model'

Exception in thread Thread-2:

Traceback (most recent call last):

  File "/usr/local/Cellar/python@3.9/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 980, in _bootstrap_inner

    self.run()

  File "/usr/local/Cellar/python@3.9/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 917, in run

    self._target(*self._args, **self._kwargs)

  File "/Users/xxxx/aigc/stable-diffusion-webui/modules/initialize.py", line 153, in load_model

    devices.first_time_calculation()

  File "/Users/xxxx/aigc/stable-diffusion-webui/modules/devices.py", line 148, in first_time_calculation

    linear(x)

  File "/Users/xxxx/aigc/stable-diffusion-webui/venv/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl

    return forward_call(*args, **kwargs)

  File "/Users/xxxx/aigc/stable-diffusion-webui/extensions-builtin/Lora/networks.py", line 429, in network_Linear_forward

    return originals.Linear_forward(self, input)

  File "/Users/xxxx/aigc/stable-diffusion-webui/venv/lib/python3.9/site-packages/torch/nn/modules/linear.py", line 114, in forward

    return F.linear(input, self.weight, self.bias)

RuntimeError: "addmm_impl_cpu_" not implemented for 'Half'

修改命令:

 ./webui.sh --precision full --no-half --no-half-vae --disable-nan-check --api

最后看看效果,没有特殊配置,效果不太好,但是说明整体能work了

http://www.lryc.cn/news/210572.html

相关文章:

  • FPGA_状态机工作原理
  • 【python练习】python斐波那契数列超时问题
  • SpringCloud 微服务全栈体系(五)
  • msvcp140.dll丢失的正确解决方法
  • go pprof 如何使用 --chatGPT
  • 大数据可视化BI分析工具Apache Superset实现公网远程访问
  • 软考系统架构师知识点集锦二:软件工程
  • Go并发:使用sync.Pool来性能优化
  • git stash的使用方法
  • 【影刀演示_发送邮件的格式化HTML留存】
  • 深度学习(4)---生成式对抗网络(GAN)
  • ThinkPad电脑HDMI接口失灵如何解决?
  • 第四部分:JavaScript
  • 【游戏开发】【心法】游戏设计心法系列1-以玩法为核心去设计游戏
  • chrome谷歌浏览器取消网页所有剪切板的授权方法步骤
  • 目标检测算法改进系列之嵌入Deformable ConvNets v2 (DCNv2)
  • 最新发布!阿里云卓越架构框架重磅升级
  • 如何监听/抓取两个设备/芯片之间“UART串口”通信数据--监视TXD和RXD
  • JDK项目分析的经验分享
  • Java创建一个长度为10的数组,利用Arrays.sort(), 为数组元素排序
  • python 动态加载C# 动态库的一些问题
  • 代码审计-锐捷NBR路由器 EWEB网管系统 远程命令执行
  • VBA技术资料MF75:测量所选单元格范围的高度和宽度
  • 力扣 26. 删除有序数组中的重复项
  • 【uniapp】仿微信支付界面
  • windows + ubuntu + vscode开发环境配置安装
  • 设计模式:责任链模式(C#、JAVA、JavaScript、C++、Python、Go、PHP)
  • koa搭建服务器(二)
  • LeetCode 125 验证回文串 简单
  • Android底层摸索改BUG(一):Android系统状态栏显示不下Wifi图标