Describe the bug
I looked into sampling code of DDPM, and I believe there's a mistake:
I believe the code makes assumption that 1 - alpha_prod_t = beta_prod_t, which simply isn't true.
Original sampling algorithm:
original paper

x_0 prediction from sample and predicted noise :
Eqn 15 from paper, as referenced in code snippet as well:

code implementation in diffusers:
|
# 2. compute predicted original sample from predicted noise also called |
|
# "predicted x_0" of formula (15) from https://arxiv.org/pdf/2006.11239.pdf |
|
if self.config.prediction_type == "epsilon": |
|
pred_original_sample = (sample - beta_prod_t ** (0.5) * model_output) / alpha_prod_t ** (0.5) |
Here, it clearly seems like the 1 - alpha_prod_t = beta_prod_t is being used.
investigated from post by @AlejandroBaron in #9431_
Reproduction
I haven't tested out code, but this seems fundamental formulation issue.
Logs
No response
System Info
0.30.3
Who can help?
@sayakpaul @DN6 @yiy
Describe the bug
I looked into sampling code of DDPM, and I believe there's a mistake:
I believe the code makes assumption that 1 - alpha_prod_t = beta_prod_t, which simply isn't true.
Original sampling algorithm:

original paper
x_0 prediction from sample and predicted noise :
Eqn 15 from paper, as referenced in code snippet as well:

code implementation in diffusers:
diffusers/src/diffusers/schedulers/scheduling_ddpm.py
Lines 446 to 449 in 1e8cf27
Here, it clearly seems like the 1 - alpha_prod_t = beta_prod_t is being used.
investigated from post by @AlejandroBaron in #9431_
Reproduction
I haven't tested out code, but this seems fundamental formulation issue.
Logs
No response
System Info
0.30.3
Who can help?
@sayakpaul @DN6 @yiy