win10手动安装stable-diffusion-webui

目录

1.python下载安装

2.git下载安装

3.stable-diffusion-webui下载

4.安装s-d-webui的依赖包(用国内镜像提速)

5.git下载的stable-diffusion-webui,依赖包提示已安装,但运行webui-user.bat后,又开始下载 

6.修改“stable-diffusion-webui\modules\launch_utils.py” 第318行为国内镜像地址;

7.启动成功 

8.问题处理

8.1.AttributeError: ‘NoneType‘ object has no attribute ‘lowvram‘

8.2. Can't load tokenizer for 'openai/clip-vit-large-patch14'. 

 9.运行正常,文字生成图片成功


1.python下载安装

Python Releases for Windows | Python.orgThe official home of the Python Programming Languageicon-default.png?t=N7T8https://www.python.org/downloads/windows/

2.git下载安装

Git for WindowsWe bring the awesome Git VCS to Windowsicon-default.png?t=N7T8https://gitforwindows.org/

3.stable-diffusion-webui下载

GitHub - AUTOMATIC1111/stable-diffusion-webui: Stable Diffusion web UIStable Diffusion web UI. Contribute to AUTOMATIC1111/stable-diffusion-webui development by creating an account on GitHub.icon-default.png?t=N7T8https://github.com/AUTOMATIC1111/stable-diffusion-webui

https://github.com/AUTOMATIC1111/stable-diffusion-webui.git

 使用git拉取代码;

4.安装s-d-webui的依赖包(用国内镜像提速)

pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple

 下面是之前下载离线stable-diffusion-webui-master.zip包,之后安装依赖包的过程;

  

5.git下载的stable-diffusion-webui,依赖包提示已安装,但运行webui-user.bat后,又开始下载 

先卸载之前安装的所有包;(好像没关系)

pip uninstall -r requirements.txt

重新安装依赖包;

仍然提示已经安装依赖包,但问题依然存在,运行webui-user.bat时,还会重新下载; 

6.修改“stable-diffusion-webui\modules\launch_utils.py” 第318行为国内镜像地址;

torch_index_url = os.environ.get('TORCH_INDEX_URL', "https://pypi.tuna.tsinghua.edu.cn/simple")

双击运行“webui-user.bat”,

call webui.bat --skip-torch-cuda-test  --precision full --no-half

7.启动成功 

再次双击运行“webui-user.bat”; 

http://127.0.0.1:7860/

模型文件比较大,下载地址如下(用迅雷比较快):

https://hf-mirror.com/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned.ckpt

https://hf-mirror.com/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.ckpt

8.问题处理

8.1.AttributeError: ‘NoneType‘ object has no attribute ‘lowvram‘

8.2. Can't load tokenizer for 'openai/clip-vit-large-patch14'. 

 

 在stable-diffusion-webui根目录下新建文件夹openai,命令行中进入openai目录,输入: git clone https://www.modelscope.cn/AI-ModelScope/clip-vit-large-patch14.git

 

这一步有些慢,大概二十分钟下载完毕; 

 9.运行正常,文字生成图片成功

再次运行webui-user.bat,就可以加载模型了。

 本机用的是CPU,所以生成图片时间有点长,后期配置CUDA环境就会快了。

 

  • 29
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值