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

Could you explain the q_sample ? #135

Open
sandeepjangir07 opened this issue Oct 19, 2023 · 2 comments
Open

Could you explain the q_sample ? #135

sandeepjangir07 opened this issue Oct 19, 2023 · 2 comments

Comments

@sandeepjangir07
Copy link

The return of the q_sample function is defined as : return (continuous_sqrt_alpha_cumprod * x_start + (1 - continuous_sqrt_alpha_cumprod**2).sqrt() * noise)

I do not understand this part . (1 - continuous_sqrt_alpha_cumprod**2).sqrt() : Why there is a need for square and the square root afterwards. I could not find anything in the main paper or the following paper that SR3 using to define their noise schedule. Some explanation would be good to understand it.

Thank you.

@kada0720
Copy link

@sandeepjangir07 I have the same question

@include5636
Copy link

@kada0720 @sandeepjangir07

You can find it in DDPM page 4
image

Here continuous_sqrt_alpha_cumprod is $\sqrt{\bar{\alpha}_t}$, thus continuous_sqrt_alpha_cumprod**2 equals to $\bar{\alpha}_t$

Besides, you could find similar formula in SR3 paper on the top left corner of page 3.

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