Diffusion Models, Research, Data Science, Artificial Intelligence, Stable Diffusion.
torch.randn(latents.shape[0], latents.shape[1], 1, 1) instead of the usual noise = torch.randn_like(latents) Now, to understand this, it’s important to check the shapes! torch.randn(latents.shape[0], latents.shape[1], 1, 1) has shape [batch size, channels, 1, 1]. So essentially, when we add this to