rMultistepScheduler.from_config(pipeline.scheduler.config)
Now set the num_inference_steps to 20:


	Copied
generator = torch.Generator("cuda").manual_seed(0)
image = pipeline(prompt, generator=generator, num_inference_steps=20).images[0]
image

Great, you’ve managed to cut the inference time to just 4 seconds! ⚡️

Memory
	
The other key to improving pipeline performance is consuming less memory, which indirectly implies more speed, since you’r