推荐平台:AutoDL
直接安装Anaconda不要指望Linux自带的Python。
# 创建
conda create -n webui python=3.10.6
# 进入
conda activate webui
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
# 进入文件夹
cd stable-diffusion-webui
# 更新pip
python -m pip install --upgrade pip
pip config set global.index-url <http://mirrors.aliyun.com/pypi/simple/>
pip config set global.trusted-host mirrors.aliyun.com
把github前面加上 https://ghproxy.com/ 例如:git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 替换为:git+ https://ghproxy.com/https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379
注释webui.sh中的 84-95行内容
查看ip地址 ifconfig
租的服务器都是容器,不能使用默认的127.0.0.1
bash webui.sh --server-name 172.17.0.8 --port 12345
bash webui.sh --server-name 172.17.0.8 --port 12346
1.installing gfpgan卡住 # https://ghproxy.com/https://github.com/TencentARC/GFPGAN/releases/tag/v1.3.8 去下载好文件 # 下载后,解压到stable-diffusion-webui\venv\Scripts #进入该目录 stable-diffusion-webui\venv\bin\python -m pip install basicsr facexlib stable-diffusion-webui\venv\bin\python -m pip install -r requirements.txt stable-diffusion-webui\venv\bin\python setup.py develop
2.clip安装不上的解决方案 原因:stable diffusion webui环境中的clip其实是open_clip,不能用
pip install clip
安装 解决方法是直接到github下载 open_clip代码到本地,并进行本地安装。 下载地址 下载后,解压 stable-diffusion-webui\venv\Scripts目录,然后进入该目录 stable-diffusion-webui\venv\bin\python setup.py build install