Views
No views yet




1import torch
2from diffusers import AutoencoderDC, SanaSprintPipeline
3
4device = "cuda"
5dtype = torch.float32 if device == "cpu" else torch.bfloat16
6
7pipeline = SanaSprintPipeline.from_pretrained(
8 "Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers",
9 torch_dtype=dtype,
10)
11pipeline.vae = AutoencoderDC.from_pretrained(
12 "Luke100000/dc-ae-mini-f32c32-sana-1.1-diffusers",
13 torch_dtype=dtype,
14 low_cpu_mem_usage=False
15)
16
17pipeline.to(device=device, dtype=dtype)
18
19pipeline(prompt="a tiny astronaut hatching from an egg on the moon", num_inference_steps=2, width=512, height=512).images[0]