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行为国内镜像地址;](#6.修改“stable-diffusion-webui\modules\launch_utils.py” 第318行为国内镜像地址;)

7.启动成功

8.问题处理

[8.1.AttributeError: 'NoneType' object has no attribute 'lowvram'](#8.1.AttributeError: ‘NoneType‘ object has no attribute ‘lowvram‘)

[8.2. Can't load tokenizer for 'openai/clip-vit-large-patch14'.](#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 Languagehttps://www.python.org/downloads/windows/

2.git下载安装

Git for WindowsWe bring the awesome Git VCS to Windowshttps://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.https://github.com/AUTOMATIC1111/stable-diffusion-webui

bash 复制代码
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git

使用git拉取代码;

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

python 复制代码
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后,又开始下载

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

python 复制代码
pip uninstall -r requirements.txt

重新安装依赖包;

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

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

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

双击运行"webui-user.bat",

python 复制代码
call webui.bat --skip-torch-cuda-test  --precision full --no-half

7.启动成功

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

python 复制代码
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环境就会快了。

相关推荐
Coovally AI模型快速验证4 天前
未来已来:从 CVPR & ICCV 观察 2025→2026 年计算机视觉的七大走向
人工智能·深度学习·目标检测·计算机视觉·stable diffusion
Brianna Home6 天前
大模型如何变身金融风控专家
人工智能·深度学习·机器学习·自然语言处理·stable diffusion·1024程序员节
leafff1237 天前
新手入坑 Stable Diffusion:模型、LoRA、硬件一篇讲透
人工智能·计算机视觉·stable diffusion
喆星时瑜11 天前
ComfyUI本地部署Stable Diffusion:核心组件(Python、PyTorch、CUDA)版本与显卡配置全指南
pytorch·python·stable diffusion
CV视觉12 天前
智能体综述:探索基于大型语言模型的智能体:定义、方法与前景
人工智能·语言模型·chatgpt·stable diffusion·prompt·aigc·agi
leafff12324 天前
Stable Diffusion在进行AI 创作时对算力的要求
人工智能·stable diffusion
leafff12324 天前
Stable Diffusion进行AIGC创作时的算力优化方案
人工智能·stable diffusion·aigc
ding_zhikai25 天前
stable-diffusion试验2-像素人物帧动画2(含 AnimeEffects 简易教程 等)
stable diffusion
ding_zhikai25 天前
SD:在一个 Ubuntu 系统安装 stable diffusion ComfyUI
linux·ubuntu·stable diffusion
ding_zhikai1 个月前
stable-diffusion试验2-像素人物帧动画1
stable diffusion