Skip to content

Using euler scheduler in fluxfill  #10277

@luna313

Description

@luna313

Describe the bug

I am using the customfluxfill function and want to use the Euler scheduler (EulerAncestralDiscreteScheduler) in my code. However, I am encountering the following error:

Reproduction

from diffusers.schedulers import (
DPMSolverMultistepScheduler,
    EulerAncestralDiscreteScheduler,
)

SAMPLER_MAP = {
    "DPM++ SDE Karras": lambda config: DPMSolverMultistepScheduler.from_config(
        config, use_karras_sigmas=True, algorithm_type="sde-dpmsolver++"
    ),
    "DPM++ 2M Karras": lambda config: DPMSolverMultistepScheduler.from_config(
        config, use_karras_sigmas=True
    ),
    "DPM++ 2M SDE": lambda config: DPMSolverMultistepScheduler.from_config(
        config, algorithm_type="sde-dpmsolver++"
    ),
    "DPM++ 2M SDE Karras": lambda config: DPMSolverMultistepScheduler.from_config(
        config, use_karras_sigmas=True, algorithm_type="sde-dpmsolver++"
    ),
    "Euler a": lambda config: EulerAncestralDiscreteScheduler.from_config(
        config,
    ),
}

def model_fn() -> FluxFillPipeline:
    pipe = FluxFillPipeline.from_pretrained("Planningo/flux-inpaint", torch_dtype=torch.bfloat16).to("cuda")
    # Apply the Euler scheduler
    pipe.scheduler = SAMPLER_MAP["Euler a"](pipe.scheduler.config)
    return pipe

Logs

ValueError: The current scheduler class <class 'diffusers.schedulers.scheduling_euler_ancestral_discrete.EulerAncestralDiscreteScheduler'>'s `set_timesteps` does not support custom sigmas schedules. Please check whether you are using the correct scheduler.

System Info

latest(github version diffusers), python3.10, ubuntu with nvidia gpu

Who can help?

@yiyixuxu

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleIssues that haven't received updates

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions