以下是在CentOS上安装Stable Diffusion的详细步骤:
sudo yum update -y。sudo yum install git python3 python3-pip python3-devel gcc cmake protobuf rust -y,并确保安装的Python版本正确,可参考中方法。pip3 install torch torchvision torchaudio和pip3 install xformers安装,需注意版本兼容性。wget -q https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/webui.sh。chmod +x webui.sh,然后./webui.sh,这会在当前目录生成stable-diffusion-webui文件夹。cd stable-diffusion-webui。python3 -m venv venv,source venv/bin/activate,然后升级pip并安装依赖pip install --upgrade pip,pip install -r requirements_versions.txt。python launch.py,若要使用特定模型,可在命令中指定,如python launch.py --model your_model_path。安装启动成功后,可在浏览器中访问http://127.0.0.1:7860来使用Stable Diffusion WebUI。