+ pipe.enable_model_cpu_offload() By default, the text-to-image pipeline uses the DDIMScheduler but you can replace it with another scheduler like DDPMScheduler to see how that affects the tradeoff between inference speed and image quality:   Copied from diffusers import DDPMScheduler