在Linux上部署Stable Diffusion可以分为几个步骤,包括准备硬件和软件环境、安装依赖项、克隆和配置仓库、下载模型、启动服务以及使用WebUI进行操作。以下是详细的步骤指南:
sudo apt update
sudo apt install python3.10 python3-pip
根据你的CUDA版本,从NVIDIA官网下载并安装CUDA Toolkit。然后安装对应的cuDNN库。
pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu117
pip install -r requirements.txt
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
cd stable-diffusion-webui
pip install -r requirements.txt
./webui.sh
http://localhost:7860
。对于不想手动安装依赖的用户,可以使用整合包。例如,秋叶大大提供的整合包可以直接解压并使用。。
http://localhost:7860
。pip install xformers==0.0.21
--xformers
参数提升渲染速度。。以上步骤应该可以帮助你在Linux上成功部署并使用Stable Diffusion。如果在安装过程中遇到问题,可以参考相关的教程或在社区寻求帮助。