TCDScheduler ignores set_alpha_to_one in the terminal update
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
- #15292 @twojian による — マージされずにクローズ
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 18/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 領域
- ai, machine-learning
調査の方向性
The terminal-step alpha is read from alphas_cumprod[0] in the TCDScheduler step logic, not from final_alpha_cumprod, so set_alpha_to_one has no effect there. Run the reproduction snippet on CPU to confirm both flags return about 0.0292. Done means the True case returns 0 while the False case is unchanged, and this needs a maintainer decision on the intended semantics. Linked PR #15292 already proposes a fix, so check it before starting.
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
TCDScheduler documents that set_alpha_to_one=True sets the final alpha cumulative product to 1. However, the terminal update currently uses alphas_cumprod[0], regardless of that setting.
As a result, set_alpha_to_one=True and False produce the same terminal output in the following CPU reproduction.
The terminal update uses alphas_cumprod[0] instead of final_alpha_cumprod, bypassing the set_alpha_to_one configuration.
The TCD reference implementation also uses index 0 at the endpoint, so this may be an intentional compatibility choice rather than an implementation oversight. However, it differs from the documented behavior.
I have submitted PR #15292 with a proposed fix and CPU regression tests. Maintainer guidance on the intended terminal-alpha semantics would be appreciated.
Reproduction
import torch
from diffusers import TCDScheduler
for flag in (True, False):
scheduler = TCDScheduler(
prediction_type="sample",
set_alpha_to_one=flag,
)
scheduler.set_timesteps(1, device="cpu")
sample = torch.ones(1, 1)
result = scheduler.step(
torch.zeros_like(sample),
scheduler.timesteps[0],
sample,
)
print(flag, result.prev_sample.item())
Observed behavior: both settings return approximately 0.0292233.
Expected behavior under the documented terminal-alpha semantics: the True case returns 0, while the False case retains the existing output.
Context
While investigating TCDScheduler's terminal-step behavior and validating scheduler correctness on CPU, I found that changing set_alpha_to_one had no effect on the terminal output.
This matters for users relying on the documented scheduler configuration and for reproducibility when comparing different terminal-alpha settings.
Logs
System Info
- OS: Windows
- Diffusers: 0.44.0.dev0 (development version)
- Device: CPU
- PyTorch: 2.9.0+cu126
- Python: 3.12.8
The minimal reproduction uses CPU only and does not require CUDA.
Who can help?
No response
- 主要言語
- Python
- スター
- 35k
- フォーク
- 7.5k
- 平均マージ
- 2日 22時間
- マージ済み PR(30日)
- 58
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
huggingface/diffusers のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
huggingface/diffusers#15436 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
InpaintProcessor crashes when padding_mask_crop is set and a dimension is omitted対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
huggingface/diffusers#15433 ·
メンテナーはふだん 1 日以内に返信
-
LTXEulerAncestralRFScheduler skips signal scaling with s_noise=0対応中かも @hparik11 が 3 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
huggingface/diffusers#15423 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Docs: 13 docstrings document parameters their functions don't have対応中かも @M-Colley が 3 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
huggingface/diffusers#15363 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
`ZImageImg2ImgPipeline` / `ZImageInpaintPipeline`: explicit height/width different from the input image raises RuntimeError対応中かも @chessing234 が 11 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
huggingface/diffusers#15337 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
huggingface/diffusers の issue をすべて見る
似ている issue
-
[19.0] pos_sale: settling an order with a 0 down payment line crashes (reading 'reward_id') and leaves a wrong amount due対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 79/100
developmentseed/titiler-covjson#164 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
awslabs/visual-asset-management-system#2164 ·
メンテナーはふだん 1 日以内に返信
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
MakazhanAlpamys/Soup#3589 ·
メンテナーはふだん 1 日以内に返信
-
channels status reports the wrong Enabled value for Feishu instances and default-enabled WebSocketオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信