前段时间这个novelAI数据集泻露开源了之后,网上就流出了一堆AI作品,看着还不错,再一看任务管理器,这12GB显存空荡荡,就大抵想装个玩玩。
本文负责踩坑,安装可参照官方文档
https://github.com/AUTOMATIC1111/stable-diffusion-webui
or
https://www.tjsky.net/tutorial/457
1.github.com无法访问
大抵是受“长城”(你懂的)和国际带宽的影响,国内github经常出现无法访问的情况,要正常访问,可以使用V( )( )或watttoolkit,或者直接使用国内镜像(kgithub.com)(这个方法我们后续也会用到)。
附:国内镜像使用方法:将网址内的github.com统一替换成kgithub.com
如:https://github.com/AUTOMATIC1111/stable-diffusion-webui ==》 https://kgithub.com/AUTOMATIC1111/stable-diffusion-webui
2.Installing torch and torchvision报错
安装torch的时候碰到:
stderr: ERROR: Could not find a version that satisfies the requirement torch==1.12.1+cu113
emmm,这个只能说大概率重装一下python会解决(因为我就是这么解决的)。当然,建议这些东西都在像anaconda这种python虚拟环境中配置,并且还可以省去配置git的烦恼
anaconda环境下的安装教程:
https://rentry.org/voldy#-troubleshooting-
3.Installing gfpgan报错
像这样:
Installing gfpgan
Traceback (most recent call last):
File "E:\ai\stable-diffusion-webui\launch.py", line 122, in <module>
run_pip(f"install {gfpgan_package}", "gfpgan")
File "E:\ai\stable-diffusion-webui\launch.py", line 64, in run_pip
return run(f'"{python}" -m pip {args} --prefer-binary', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}")
File "E:\ai\stable-diffusion-webui\launch.py", line 54, in run
raise RuntimeError(message)
RuntimeError: Couldn't install gfpgan.
Command: "E:\ai\stable-diffusion-webui\venv\Scripts\python.exe" -m pip install git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 --prefer-binary
Error code: 1
stdout: Collecting git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379
Cloning GitHub - TencentARC/GFPGAN: GFPGAN aims at developing Practical Algorithms for Real-world Face Restoration. (to revision 8d2447a2d918f8eba5a4a01463fd48e45126a379) to c:\users\administrator\appdata\local\temp\pip-req-build-4wh1o0zx
stderr: Running command git clone --filter=blob:none --quiet https://github.com/TencentARC/GFPGAN.git 'C:\Users\Administrator\AppData\Local\Temp\pip-req-build-4wh1o0zx'
Running command git rev-parse -q --verify 'sha^8d2447a2d918f8eba5a4a01463fd48e45126a379'
Running command git fetch -q GitHub - TencentARC/GFPGAN: GFPGAN aims at developing Practical Algorithms for Real-world Face Restoration. 8d2447a2d918f8eba5a4a01463fd48e45126a379
fatal: unable to access 'https://github.com/TencentARC/GFPGAN.git/': OpenSSL SSL_connect: Connection was reset in connection to github.com:443
error: subprocess-exited-with-error
git fetch -q https://github.com/TencentARC/GFPGAN.git 8d2447a2d918f8eba5a4a01463fd48e45126a379 did not run successfully.
exit code: 128
See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
git fetch -q https://github.com/TencentARC/GFPGAN.git 8d2447a2d918f8eba5a4a01463fd48e45126a379 did not run successfully.
exit code: 128
See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
不用想,又是国内github连不上
这位老哥提供了一个思路(https://blog.csdn.net/Tjzlo/article/details/127309267):修改stable-diffusion-webui-master文件夹中的launch.py
最好用python编辑器打开,没有的话直接用记事本打开编辑
记事本按下ctrl+F使用搜索功能,上面就会有一个对话框,输入github.com搜索,并将里面所有的github.com替换为kgithub.com(或者一个国内能用的镜像or加速网址)

CTRL+shift可呼出搜索(查找)框

替换github.com---->kgithub.com
保存,重新运行webui-user.bat
解决!!!
4.至于模型的安装与下载
https://www.tjsky.net/tutorial/457中也有提到,当然,B站的up们也提供了许多很好的模型,https://www.bilibili.com/video/BV1dR4y1D7bK/?share_source=copy_web&vd_source=6ce7ac306ec9c4efdf15cfcb26ab1abe
up:小李xiaolxl 提供的模型(注:链接在他视频的评论区)
教程大同小异,Windows端模型安装建议走https://www.tjsky.net/tutorial/457中的教程
End.
祝大家玩得愉快