在Linux上部署Stable Diffusion常用的是通过WebUI方式,以下是基于Ubuntu系统的部署步骤:
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
,然后运行bash Miniconda3-latest-Linux-x86_64.sh
,按提示操作。conda create -n sdwebui python==3.10.6
,创建后激活环境conda activate sdwebui
。git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
,进入目录后安装依赖pip3 install -r requirements_versions.txt
等。wget -c https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors -O /models/Stable-diffusion/v1-5-pruned-emaonly.safetensors
。./webui.sh
即可启动Stable Diffusion WebUI,可通过http://localhost:7860
访问。