huggingface / huggingface/diffusers

stabilityai/stable-diffusion-2-base DDIM config is not compatible with current DDIM implementation

オープン
#7,217 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug needs-code-example stale
主要言語
Python
スター
34.5k
フォーク
7.3k
平均マージ
3日 3時間
マージ済み PR(30日)
91

説明

### Describe the bug

Assume 30 inference steps.

There are two 925, and the number of inference steps is 31.
tensor([958, 925, 925, 892, 859, 826, 793, 760, 727, 694, 661, 628, 595, 562,
529, 496, 463, 430, 397, 364, 331, 298, 265, 232, 199, 166, 133, 100,
67, 34, 1], device='cuda:0')
```
{
"_class_name": "DDIMScheduler",
"_diffusers_version": "0.8.0",
"beta_end": 0.012,
"beta_schedule": "scaled_linear",
"beta_start": 0.00085,
"clip_sample": false,
"num_train_timesteps": 1000,
"set_alpha_to_one": false,
"skip_prk_steps": true,
"steps_offset": 1,
"trained_betas": null
}
```

The correct one should be.
tensor([958, 925, 892, 859, 826, 793, 760, 727, 694, 661, 628, 595, 562, 529,
496, 463, 430, 397, 364, 331, 298, 265, 232, 199, 166, 133, 100, 67,
34, 1], device='cuda:0')
```

{
"_class_name": "DDIMScheduler",
"_diffusers_version": "0.25.0",
"beta_end": 0.012,
"beta_schedule": "scaled_linear",
"beta_start": 0.00085,
"clip_sample": false,
"clip_sample_range": 1.0,
"dynamic_thresholding_ratio": 0.995,
"num_train_timesteps": 1000,
"prediction_type": "epsilon",
"rescale_betas_zero_snr": false,
"sample_max_value": 1.0,
"set_alpha_to_one": false,
"steps_offset": 1,
"thresholding": false,
"timestep_spacing": "leading",
"trained_betas": null
}
```

### Reproduction

See above

### Logs

_No response_

### System Info

Version: 0.26.3

### Who can help?

_No response_

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

DDIMScheduler の実装と提供された scheduler 設定から始め、30 回の推論ステップにおける timestep の設定を比較します。stable-diffusion-2-base 設定に対して 2 つの tensor 出力を再現します。現在の実装が、指定された scheduler の動作を壊すことなく、期待される 30 ステップのシーケンスを生成すれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python, pytorch
領域
machine-learning
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。