r = EulerDiscreteScheduler.from_pretrained(repo_id, subfolder="scheduler")
# or
# scheduler = DPMSolverMultistepScheduler.from_pretrained(repo_id, subfolder="scheduler")

stable_diffusion = DiffusionPipeline.from_pretrained(repo_id, scheduler=scheduler)
Three things are worth paying attention to here.
First, the scheduler is loaded with SchedulerMixin.from_pretrained()
Second, the scheduler is loaded with a function argument, called subfolder="