CrossAttentionControl icon indicating copy to clipboard operation
CrossAttentionControl copied to clipboard

Question about the code in CrossAttention_Release.ipynb

Open sunwoo76 opened this issue 3 years ago • 1 comments

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.

sunwoo76 avatar Sep 12 '22 21:09 sunwoo76

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.

bloc97 avatar Sep 13 '22 11:09 bloc97