Views
No views yet

1from diffusers import DiffusionPipeline, DPMSolverSinglestepScheduler
2import torch
3
4pipe = DiffusionPipeline.from_pretrained(
5 "mann-e/Mann-E_Dreams", torch_dtype=torch.float16
6).to("cuda")
7
8#This is equivalent to DPM++ SDE Karras, as noted in https://huggingface.co/docs/diffusers/main/en/api/schedulers/overview
9pipe.scheduler = DPMSolverSinglestepScheduler.from_config(pipe.scheduler.config, use_karras_sigmas=True)
10
11image = pipe(
12 prompt="a cat in a bustling middle eastern city",
13 num_inference_steps=8,
14 guidance_scale=3,
15 width=768,
16 height=768,
17 clip_skip=1
18).images[0]
19image.save("a_cat.png")TPXpiWACUZXtUszDbpLeDYR75NQTwngD8o0x44e262f121b88bcb21caac3d353edd78c3717e08