直接按照官网给的安装AUTOMATIC1111即可,大部分都是网络原因,接下来说一下我遇到的网络问题,在本文中是用的conda创建的python=3.10.6版本的虚拟环境下完成。
首先配置pip源,我推荐使用阿里源,之前使用清华源使用的好好的后面发现又不行,在终端输入如下命令:
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
pip config set install.trusted-host mirrors.aliyun.com
接下来,设置git代理:
git config --global http.proxy http://127.0.0.1:7890
git config --global https.proxy https://127.0.0.1:7890
这个git代理后面最好取消一下
git config --global --unset http.proxy
git config --global --unset https.proxy
然后创建一个当前终端的环境变量代理,这样方便下载默认模型:
export https_proxy="https://127.0.0.1:7890"
export http_proxy="http://127.0.0.1:7890"
最后执行如下命令:
wget -q https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/webui.sh
./webui.sh --xformers
这个./webui.sh --xformers命令是为了解决安装xformers的问题