在CentOS上安装Stable Diffusion涉及多个步骤,包括安装必要的软件包、配置环境、下载和启动WebUI等。以下是一个详细的安装教程:
sudo yum update -ysudo yum install git cmake protobuf rust python@3.10 openssl-devel zlib-devel libffi-devel -y/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"cd /usr/local
wget https://www.python.org/ftp/python/3.10.6/Python-3.10.6.tgz
tar -zxvf Python-3.10.6.tgz
cd Python-3.10.6
./configure --prefix=/usr/local/python3 --with-openssl=/usr/local/openssl --with-openssl-rpathauto
make -j
sudo make installcd /usr/src
git clone https://github.com/git/git.git
cd git
sudo make prefix=/usr install
echo "export PATH=/usr/bin:$PATH" >> ~/.bashrc
source ~/.bashrc
git --versionwget -q https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/webui.sh
chmod +x webui.sh./webui.shcd stable-diffusion-webuipython3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements_versions.txt./webui.sh打开浏览器,访问 http://127.0.0.1:7860,即可进入Stable Diffusion WebUI界面。
对于新手来说,使用整合包可以大大简化安装过程。推荐的整合包有秋葉aaaki和独立研究员-星空的整合包。以下是使用秋葉aaaki整合包的步骤:
wget [秋葉aaaki整合包下载链接]tar -zxvf sd-webui-aki-v4.2.tar.gzcd sd-webui-aki-v4.2
./启动器运行依赖-dotnet-6.0.11.execd sd-webui-aki-v4.2
./A启动器打开浏览器,访问 http://127.0.0.1:7860,即可进入Stable Diffusion WebUI界面。