Open Mostafa-Haggag opened 1 year ago
I have a similar doubt. It seems that the author does not directly use the sampling process provided by DDPM in the code.
Instead, the mean of $x{t-1}$ is calculated using this formula.
Then use the Reparameterization Trick to obtain $x {t-1}$
You can refer to https://zhuanlan.zhihu.com/p/569994589 for a detailed derivation of DDPM, and the same applies to DDIM.
Hi, Thank you so much for your answer. I really appreciate it.
I think maybe i was not clear in my quesiton. In the line 690 In Denoising_diffusionmodel_pytorch. Why do this extra step and pass it through model and not directly returning the return of equation at line 703 directly? Why the time pairs are up to (0,-1). I do not know if I am clear but the DDIM sampler paper mentions that you should not be doing this. Under the assumption that I am predicting X_0 directly
I shared a lin of code to make sure that I am more clear.
I had a question in denoising_diffusion_pytorch.py why in ddim_sample we sample till step -1. shouldnot we just return the output returned from the DDIM equation at step 0, why do we use it again to predict a new x_start and this x_start is returned? Thanks, Mostafa