Skip to content

Fix denoising sampling #16

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

Closed
wants to merge 3 commits into from
Closed

Fix denoising sampling #16

wants to merge 3 commits into from

Conversation

kashif
Copy link
Contributor

@kashif kashif commented Apr 20, 2022

The q_posterior function as implemented is not correct and is not needed for sampling. Recall in Ho et al. equation (7) is for x_0 which is not known during sampling.

And in Alg. 2 line 4 we just need the slightly denoised sample.

Issue flagged to me by @NielsRogge so all credit to him if I am not mistaken... and if I am mistaken then it's my fault!

kashif added 3 commits April 20, 2022 12:44
The q_posterior function is not correct and not needed for sampling.
@NielsRogge
Copy link

NielsRogge commented Apr 20, 2022

Disclaimer: I'm still figuring out the sampling code :D not sure what's correct. I'm just wondering to which equations in the DDPM paper the predict_start_from_noise and q_posterior methods correspond.

As of now, it seems that predict_start_from_noise corresponds to equation 11? Also wondering why it's called "predict start from noise" => does it mean predict the mean of the conditional distribution?

@kashif
Copy link
Contributor Author

kashif commented Apr 20, 2022

closing the PR as hojonathanho/diffusion#5 seems to answer it...

@kashif kashif closed this Apr 20, 2022
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

Successfully merging this pull request may close these issues.

2 participants