文章目录
- bugs
- 虚拟环境python
- gfpgan和cython
bugs
看网上部署stable diffusion webui的教程,很简单。而且我也有部署stable diffusion v1/v2的经验,想着应该会很快部署完stable diffusion webui,但是没想到在部署过程中,遇到各种各样的奇葩问题,特此在此记录一下。
虚拟环境python
stable diffusion webui支持python版本大于等于3.10.6,首先conda search python
查看conda支持的python版本,我的conda支持到3.11,所以创建python=3.10.6的虚拟环境,出现如下错误。libgcc-ng等的版本不满足要求。
我使用的是清华源,解决方案就是添加conda-forge通道conda config --append channels conda-forge
,能够访问https://anaconda.org下载清华源中不存在的包。
gfpgan和cython
如上图所示,gfpgan和Cython都已经安装好的情况下,运行./webui.sh,出现
Couldn't install gfpgan.
和 Error Could not find a version that satisfies the requirement cython
。这个问题试了很多种方法,但是问题仍然存在。
- 出现一个很奇怪的事情,我的python版本是3.10.6,但是运行./webui.sh时,出现的Python版本是3.8,而且venv/lib下的python也是3.8。至今也没想出来,怎么冒出来一个python3.8。解决方案就是:删除整个venv整个文件夹,重新运行./webui.sh,python版本变成3.10.6,但是上述问题仍然存在。
- 确认python为3.10.6而不是3.8之后,注释掉modules/launch_utils.py文件中关于gfpgan安装的代码之后,运行./webui.sh,部署成功。需全部注释掉之后才可以。
等待一段时间依序安装所需软件,部署成功。
clip和open_clip的安装问题,在modules/launch_utils.py中将"https://github.com/“更改为"https://kgithub.com/”。
使用xformers,在webui-user.sh中添加export COMMANDLINE_ARGS="--autolaunch --xformers"
命令行。