
目录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. Cant 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-webuihttps://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-half7.启动成功再次双击运行“webui-user.bat”;http://127.0.0.1:7860/模型文件比较大下载地址如下用迅雷比较快https://hf-mirror.com/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned.ckpthttps://hf-mirror.com/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.ckpt8.问题处理8.1.AttributeError: ‘NoneType‘ object has no attribute ‘lowvram‘8.2. Cant 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环境就会快了。