stable-diffusion-webui windows 下安装

SD指南1年前 (2023)发布 一起用AI
434 0 0

建议下载zip版而不是直接git clone( 网址),因为git 版仍处于变动之中 ​​​

1.zip 解压后 得到stable-diffusion-webui-master 目录

2.下载miniconda3 (网址),如果默认安装,无需任何修改 。如果安装位置改变,需要webui.cmd 中 custom_conda_path 指定位置。如果已经安装anaconda ,同样在custom_conda_path 指定位置

3.pip 本地源的指定 在用户目录下创建 pip/pip.ini 文件,输入:

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host = pypi.tuna.tsinghua.edu.cn

4. 下载 1.4 AI modelTorrent magnet:

重命名 .ckpt 为 “model.ckpt”, 放在目录 /models/ldm/stable-diffusion-v1

5. 下载 GFPGAN pre-trained model

放在 /src/gfpgan/experiments/pretrained_models/

6. 下载 RealESRGAN_x4plus.pthRealESRGAN_x4plus_anime_6B.pth

放在 /src/realesrgan/experiments/pretrained_models

7 运行 webui.cmd

报错:

报错 import cv2,出现“ImportError: DLL load failed: 找不到指定的模块”

是因为 C:\ProgramData\Miniconda3\envs\ldm\Lib\site-packages\cv2 下 init 文件有错误

把 .cv2 和 cv2.cv2 都改成 cv2 即可

© 版权声明

相关文章