vvictoryuki / FreeDoM

[ICCV 2023] Official PyTorch implementation for the paper "FreeDoM: Training-Free Energy-Guided Conditional Diffusion Model"
260 stars 9 forks source link

The issue of inconsistency between the calculation of x_prev, a.k.a. x_t-1, in the p-sample-ddim_deditional function in the code and the 5th line of Algorithm 2 in the paper #21

Open csjunjun opened 3 weeks ago

csjunjun commented 3 weeks ago

May I ask where the code corresponding to solving x_t-1 in line 5 of Algorithm 2 is located in the p_sample_ddim_conditional?

From the paper we know that the coefficient of the x_t term in line 5 of Algorithm 2 is (1+0.5*beta), but I calculated this coefficient using the code, a.k.a the coefficient for the variable x_prev is 1/sqrt(beta), which is inconsistent.

Thank you very much!

SerJamie commented 3 weeks ago

I have the same question, here is the code from ddim.py. Is c3 here equal to the hyperparameter beta? It seems like a case of variance in DDIM. code