以下是在Linux上运行Stable Diffusion模型的步骤:
python3 -m venv sd_env,激活:source sd_env/bin/activate。pip install torch torchvision transformers diffusers accelerate safetensors。CompVis/stable-diffusion-v1-4)。AUTOMATIC1111/stable-diffusion-webui)。export CUDA_VISIBLE_DEVICES=0(指定GPU编号)。python run.py --prompt "your text" --ckpt_path /path/to/model.ckpt(参数根据项目调整)。参考来源: