Views
No views yet
.safetensors versions of the TAESD weights.1import torch
2from diffusers import DiffusionPipeline, AutoencoderTiny
3
4pipe = DiffusionPipeline.from_pretrained(
5 "stabilityai/stable-diffusion-2-1-base", torch_dtype=torch.float16
6)
7pipe.vae = AutoencoderTiny.from_pretrained("madebyollin/taesd", torch_dtype=torch.float16)
8pipe = pipe.to("cuda")
9
10prompt = "slice of delicious New York-style cheesecake topped with berries, mint, chocolate crumble"
11image = pipe(prompt, num_inference_steps=50, generator=torch.Generator("cpu").manual_seed(0x7A35D)).images[0]
12image.save("cheesecake.png")