Third, the scheduler instance can simply be passed with the scheduler keyword argument to DiffusionPipeline.from_pretrained(). This works because the StableDiffusionPipeline defines its scheduler with the scheduler attribute. It’s not possible to use a different name, such as sampler=scheduler since sampler is not a defined keyword for StableDiffusionPipeline.__init__()