-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Formulation of reverse diffusion process in DDPM ( 1 - alpha_prod_t = beta_prod_t assumption) #9474
Comments
It looks like its a unfortunate naming, where beta_prod_t is defined as 1 - alpha_prod_t: diffusers/src/diffusers/schedulers/scheduling_ddpm.py Lines 438 to 444 in 1e8cf27
I think it should be renamed for clarity. |
cc: @yiyixuxu |
Perhaps a comment could be added to clarify the confusion. That seems like the easiest solution to me. |
Thanks! Also, could you please clarify why is this formulation is used for sampling (step function)? The algo in paper sample from the Gaussian(pred_prev_mean, variance). Why do we first convert to the predicted original sample (pred_x_0) and then use following for mean calculation: diffusers/src/diffusers/schedulers/scheduling_ddpm.py Lines 468 to 475 in 1e8cf27
|
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
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
The text was updated successfully, but these errors were encountered: