Text generation pictures study notes

Table of contents

diffusion-v1-5

Modify parameter sample_size:


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

Guess you like

Origin blog.csdn.net/jacke121/article/details/134981149