Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using euler scheduler in fluxfill #10277

Open
luna313 opened this issue Dec 18, 2024 · 2 comments
Open

Using euler scheduler in fluxfill #10277

luna313 opened this issue Dec 18, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@luna313
Copy link

luna313 commented Dec 18, 2024

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

@luna313 luna313 added the bug Something isn't working label Dec 18, 2024
@hlky
Copy link
Collaborator

hlky commented Dec 18, 2024

Hi @luna313! We are working on supporting more schedulers for Flow Match models like Flux, we support FlowMatchEulerDiscreteScheduler for now.

@luna313
Copy link
Author

luna313 commented Dec 19, 2024

@hlky Thank you for your response! I hope that the feature will be supported soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants