Table of contents
diffusion-v1-5
Install:
pip install diffusers
Model download address:
A complete and in-depth analysis of the core basic knowledge of Stable Diffusion (SD) - Zhihu
from diffusers import StableDiffusionPipeline
import torch
model_id = "./stable-diffusion-v1-5"
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
pipe = pipe.to("cuda")
prompt = "a