Linux端部署Stable Diffusion报错解决

【新修正】手把手教你在linux中部署stable-diffusion-webui N卡A卡显卡可用 – 哔哩哔哩 (bilibili.com)

参照如上教程进行部署,感谢作者的教程

实际部署中遇到如下bug,主要是在运行启动脚本的时候

sh start.sh

1、RuntimeError: cannot import name ‘_compare_version’ from ‘torchmetrics.utilities.imports’

需要降级一下torchmetrics包,运行

conda install torchmetrics==0.11.4

2、orch is not able to use GPU; add –skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check

说明torch的版本与cuda版本冲突,此时pytorch并不能使用GPU。

执行下面指令

python
import torch
torch.cuda.is_available()

会输出False

这时候可以试着从pytorch官网复制对应版本指令重新安装一遍torch,

如果还不行的话就再建虚拟环境重新跑一遍脚本

3 执行bash start.sh的时候卡在 installing clip

先执行

pip install clip

再执行一遍bash start.sh

4 执行bash start.sh的时候卡在 installing open_clip

先执行

pip install open_clip_torch

再执行一遍bash start.sh

服务器端部署之后出图速度快了很多!!!

太酷啦!!!开森

希望可以帮助到大家

文章出处登录后可见!

已经登录?立即刷新

共计人评分,平均

到目前为止还没有投票!成为第一位评论此文章。

(0)
青葱年少的头像青葱年少普通用户
上一篇 2023年12月20日
下一篇 2023年12月20日

相关推荐