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

Question about the code in CrossAttention_Release.ipynb #12

Open
sunwoo76 opened this issue Sep 12, 2022 · 1 comment
Open

Question about the code in CrossAttention_Release.ipynb #12

sunwoo76 opened this issue Sep 12, 2022 · 1 comment

Comments

@sunwoo76
Copy link

Hello,
Thank you for sharing your awesome code! :)

I have a question about this line:
latent_model_input = (latent_model_input / ((sigma**2 + 1) ** 0.5)).to(unet.dtype)

Could you give me some explanations about the reason that "(simga**2+1)**0.5" is needed ?

Thanks.

@bloc97
Copy link
Owner

bloc97 commented Sep 13, 2022

That is for normalizing the latents before passing it to the u-net, as required for k-lms. This line is not required for all the other schedulers.

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

2 participants