在CentOS上安装Stable Diffusion涉及多个步骤,包括安装必要的软件包、配置环境、下载和安装WebUI等。以下是一个详细的安装指南:
sudo yum update -y
sudo yum install git python310 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$(nproc)
sudo make install
cd /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 --version
wget -q https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/webui.sh
chmod +x webui.sh
./webui.sh
launch.py
,添加代码禁用SSL证书验证:import ssl
ssl._create_default_https_context = ssl._create_unverified_context
通过以上步骤,你应该能够在CentOS上成功安装并运行Stable Diffusion。如果在安装过程中遇到任何问题,可以参考相关的教程或社区论坛寻求帮助。