LCMScheduler advances the generator on the final step of a strength-truncated custom schedule

未關閉
#15,368 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

@SIDDARTHAREDDY8 已經在處理了。

開始於 2026年11月20日。

  • #15364 來自 @SIDDARTHAREDDY8 —— 未關閉

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
30/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
python, pytorch

研究方向

Read LCMScheduler.step and compare it with the TCDScheduler change from #15301, which fixed the same final-step check. Reproduce with a seeded generator and a truncated schedule (timesteps=[999, 499, 19], strength=0.5), then use the regression test test_truncated_custom_timesteps_final_step_preserves_generator from #15364 as the done signal. Note that a fix is already proposed in #15364, so coordinate there before starting.

由索引模型根據 Issue 內容生成。

描述

Describe the bug

When LCMScheduler uses a non-empty custom timestep schedule truncated by strength < 1, its actual final step advances the supplied random generator even though the sampled noise is never used.

For example, timesteps=[999, 499, 19] with strength=0.5 leaves only [19], but num_inference_steps remains 3. The final-step check uses the original step count and enters the noise-sampling branch.

Same bug class as #15288 (fixed for TCDScheduler in #15301); a follow-up to the review on #15301, which suggested applying the same one-line change to LCMScheduler.step. A fix is proposed in #15364.

Reproduction

Call LCMScheduler.step with a truncated custom schedule (e.g. timesteps=[999, 499, 19], strength=0.5) and a seeded generator: the generator state advances on the final step on unpatched code. Regression test test_truncated_custom_timesteps_final_step_preserves_generator in #15364 fails on unpatched code and passes with the fix.

Expected behavior

The generator state should be untouched on the actual final step of the truncated schedule.

主要語言
Python
星號
35k
分支
7.5k
平均合併
2 天 22 小時
30 天內合併 PR
58

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

huggingface/diffusers 的其他 Issue

查看 huggingface/diffusers 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。