huggingface / huggingface/diffusers

Using euler scheduler in fluxfill

Open
#10,277 4 comments 0 reactions 0 assignees View on GitHub
bug stale
Dominant language
Python
Stars
34.5k
Forks
7.3k
Avg merge
3d 3h
Merged PRs (30d)
91

Description

### 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

```shell
ValueError: The current scheduler class '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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.