π VAE
VAE stands for variational autoencoder
Last updated
VAE stands for variational autoencoder
Last updated
It is done using a technique called the variational autoencoder. (VAE file)
The VAE neural network has two parts:
An encoder
A decoder
The encoder compresses an image to a lower dimensional representation in the latent space. The decoder restores the image from the latent space.
The latent space of the Stable Diffusion model is 4x64x64, 48 times smaller than the image pixel space. All the forward and reverse diffusions we talked about are done in the latent space.
And during training, instead of generating a noisy image, it generates a random tensor in latent space (latent noise). Instead of corrupting an image with noise, it corrupts the representation of the image in latent space with the latent noise. The reason for doing that is it is a lot faster since the latent space is smaller.