手动安装stable diffusion的步骤

下载Python和git的安装包

下载地址:

链接:https://pan.baidu.com/s/1YwPVRa2eZlBRlQWyIsNyIg?pwd=lh7f

安装Python(安装过程中添加到环境变量路径的框框打上勾)

安装git

下载stable diffusion源程序

在一个空间大于100G的磁盘(最好是固态硬盘)新建一个文件夹,文件夹名称最好是全英文的,例如(SD1111)

进入到该文件夹,右键“Git Bash Here”

输入命令:”git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui”,回车开始下载安装(有时候需要科学上网)

下载完成后文件夹中会出现一个“stable-diffusion-webui”的子文件夹,点击进入该文件夹;

运行webui-user.bat

右键点击“webui-user.bat”,以管理员身份运行;

期间可能出现如下的报错:

stderr: ERROR: Ignored the following versions that require a different python version: 1.6.2 Requires-Python >=3.7,<3.10; 1.6.3 Requires-Python >=3.7,<3.10; 1.7.0 Requires-Python >=3.7,<3.10; 1.7.0rc1 Requires-Python >=3.7,<3.10; 1.7.0rc2 Requires-Python >=3.7,<3.10; 1.7.1 Requires-Python >=3.7,<3.10
ERROR: Could not find a version that satisfies the requirement tb-nightly (from gfpgan) (from versions: none)
ERROR: No matching distribution found for tb-nightly

解决方案:

根目录(就是点进“stable-diffusion-webui”这个文件夹)地址栏输入“cmd”

在cmd中输入激活虚拟环境:
venv\Scripts\activate.bat

手动安装tb-nightly:
pip install -i https://mirrors.aliyun.com/pypi/simple/ tb-nightly

再重新运行“webui-user.bat”

这个时候程序会自动下载和安装一些插件和模型(时间会比较旧,具体看你的网络情况),如下所示:

手动安装stable diffusion的步骤

当看到有“Running on local URL: http://127.0.0.1:7860”的时候,说明已经正常运行了!

可能的问题

安装完成后,浏览器打开:http://127.0.0.1:7860/,提示如下的报错:

Something went wrong Expecting value: line 1 column 1 (char 0)

手动安装stable diffusion的步骤

解决方案:

修改webui-user.bat文件(Linux系统对应webui-user.sh),增加参数:

--no-gradio-queue

修改之后我的webui-user.bat文件完整内容如下:

@echo off

set PYTHON=
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS= --autolaunch --theme dark --xformers --no-half --no-gradio-queue

call webui.bat

参考档案:https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/9150

原创文章,作者:朋远方,如若转载,请注明出处:https://caovan.com/shoudonganzhuangstable-diffusiondebuzhou/.html

(3)
打赏 微信扫一扫 微信扫一扫
朋远方的头像朋远方
上一篇 2023年7月7日 下午3:13
下一篇 2023年7月13日 下午5:37

相关推荐

发表回复

登录后才能评论