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

calculation of sqrt_recipm1_alphas_bar #12

Open
vox-1 opened this issue Dec 17, 2024 · 2 comments
Open

calculation of sqrt_recipm1_alphas_bar #12

vox-1 opened this issue Dec 17, 2024 · 2 comments

Comments

@vox-1
Copy link

vox-1 commented Dec 17, 2024

Hi,
Whether this is a bug or not is on line 55 of diffusion.py: self.sqrt_recipm1_alphas_bar = torch.exp(self.log_one_minus_alphas_bar - self.log_sqrt_alphas_bar)?
When I read this code, I found that the calculation of sqrt_recipm1_alphas_bar should use log_sqrt_one_minus_alphas_bar instead of log_one_minus_alphas_bar, and this code is missing sqrt part.

@vox-1
Copy link
Author

vox-1 commented Dec 17, 2024

In line 84 of dissusion.py : var = self._extract(1.0 - self.sqrt_alphas_bar, t, x_0.shape), should it be changed to 1.0 - self.alphas_bar?

@vox-1
Copy link
Author

vox-1 commented Dec 17, 2024

In line 84 of dissusion.py : self._extract(coef = self.sqrt_one_minus_alphas_bar, t = t, x_shape = x_t.shape) * eps should it be changed to self.sqrt_recipm1_alphas_bar

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

1 participant