配置要求
安装 Git
1、【Mac】使用 HomeBrew 进行 快捷安装,文章内部有安装部分(注意如果是 zsh 解释器需要修改的事 .zshrc 环境变量文件,git 安装存放路径以输出的为准)。
2、【Mac、Windows】通过 Git 官网 下载安装。
- # 查看安装是否成功
- $ git -v
-
- # git version 2.42.0
-
安装 Python
1、【Mac】使用 HomeBrew 安装 pyenv 多版本管理 快捷安装需要的 Python 版本。
2、【Mac、Windows】通过 Git 官网 下载安装。
- # 查看安装是否成功
- $ python -V
-
- # Python 3.11.0
-
安装 Stable Diffusion
1、进入 stable-diffusion-webui Github 进行下载。
- # 如果下载不了,则网页内手动下载,服务器就文件上传
- $ git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
-
2、解压打开文件
Windows 找到文件夹中的 webui.bat 或 webui-user.bat 进行双击安装,在等待一段时间后,会给出一个地址。
Mac 找到文件夹中的 webui.sh 或 webui-user.sh 使用命令进行安装,在等待一段时间后,会给出一个地址。
- # 或 $ sh webui-user.sh
- $ sh webui.sh
-
- # 也支持 python 版本 $ python webui.py
- # 注意:安装的内容都在 /Users/dengzemiao/stable-diffusion-webui 文件中
-
- # 如果还是下载失败,则需要继续修改 git 缓存的大小
- $ git config --global http.postBuffer 5242880000
-
- File "/Users/dengzemiao/.pyenv/versions/3.11.0/lib/python3.11/lzma.py", line 27, in <module>
-
- from _lzma import *
-
- ModuleNotFoundError: No module named '_lzma'
-
- $ sh webui.sh
-