DMScheduler, exchange it for the UniPCMultistepScheduler to see how easy it is to plug a different scheduler in:   Copied >>> from diffusers import UniPCMultistepScheduler

>>> scheduler = UniPCMultistepScheduler.from_pretrained("CompVis/stable-diffusion-v1-4", subfolder="scheduler") To speed up inference, move the models to a GPU since, unlike the scheduler, they have trainable weights:   Copied >>> torch_device = "cuda"
>>> vae.to(torch_devic