huggingface / huggingface/diffusers
[BUG] FlowMatchEulerDiscreteScheduler.__init__ computes sigma_min/sigma_max after shift, causing duplicate shift in set_timesteps
@dg845 がすでに取り組んでいます。
2026年6月16日 から。
- 主要言語
- Python
- スター
- 34.5k
- フォーク
- 7.3k
- 平均マージ
- 3日 3時間
- マージ済み PR(30日)
- 91
説明
Describe the bug
There is an initialization order issue in the FlowMatchEulerDiscreteScheduler class that causes set_timesteps to apply timestep shifting twice, resulting in different sigma values for the same timestep settings.
https://github.com/huggingface/diffusers/blob/07a63e197e10860a470576cf4f610381b31a4dd7/src/diffusers/schedulers/scheduling_flow_match_euler_discrete.py#L132-L143
Then in the set_timesteps method:
https://github.com/huggingface/diffusers/blob/07a63e197e10860a470576cf4f610381b31a4dd7/src/diffusers/schedulers/scheduling_flow_match_euler_discrete.py#L333-L350
sigma_min will be saved after shift and used to generate a new list of sigma, then there is another shift happening :).
Reproduction
scheduler = FlowMatchEulerDiscreteScheduler.from_pretrained(
os.path.join(model_path, "scheduler"),
)
default scheduler.num_train_timesteps=1000,shift=3.0
print(scheduler.sigmas)
scheduler.set_timesteps(1000)
print(scheduler.sigmas)
Logs
System Info
Environment
diffusers version
Python 3.13
Affected file: diffusers/schedulers/scheduling_flow_match_euler_discrete.py
Who can help?
No response
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
評価
この issue はまだ評価されていません。