Skip to content
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

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 this issue Aug 20, 2024 · 2 comments

Comments

@csjunjun
Copy link

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!

@JamieCR1999
Copy link

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

@HolmesShuan
Copy link

image

@SerJamie @csjunjun The code in ddim.py is based on the derivation of DPS from the paper “Diffusion Posterior Sampling for General Noisy Inverse Problems”. The definition of the hyperparameter c3 can be found in the official DPS code, where its connection between DDIM and DDPM is established.

Additionally, you could consider treating “Freedom” as replacing measurement models (the red line in the DPS Algorithm) with losses related to style, face ID, etc., while keeping the rest of the pipeline intact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants