VAE (Variational Autoencoder) stands for variational autoencoder . It is part of a neural network model that encodes and decodes images into and out of a smaller latent space.

VAE allows you to improve eye visualization when generating images in the Stable Diffusion neural network.

All used models (v1, v2 or custom) already have VAE by default.

When it comes to downloading and using VAE, we are talking about using its enhanced version. This occurs when the model instructor further tunes part of the VAE model with additional data.

So, instead of releasing a new model that is a large file, the instructor only releases a small updated portion of it.

Improved VAE better decodes the image from the latent space, so fine details are better restored. This helps to detail the eyes and other small details.

Stability AI has released two variants of finely tuned VAE decoders: EMA and MSE. EMA produces sharper images and MSE images are smoother.

Stable Diffusion neural network: VAE autoencoder for eye and facial enhancement

EMA and MSE are compatible with Stable Diffusion v2.0. You can use them, but the effect will be minimal. 2.0 already renders eyes very well.

You only need to set up VAE once, and the art creation workflow will be the same after that.

Below are the direct links to download VAE:

Download link EMA VAE

MSE VAE Download Link

Place the downloaded VAE files in the directory:

stable-diffusion-webui/models/VAE

To use VAE in the AUTOMATIC1111 GUI, go to the Settings tab and click the Stable Distribution section on the left. Find the section called SD VAE . From the drop-down menu, select the VAE file you want to use. Click the big red “Apply settings” button at the top.

The universal VAE sd-vae-ft-ema-original is recommended (you can also download it here: https://huggingface.co/stabilityai/sd-vae-ft-ema-original/blob/main/vae-ft-ema-560000- ema-pruned.safetensors ).

Place the file in the stable-diffusion-webui/models/VAE folder .
Next we do a restart.

In the <Setting> tab, select the settings – Stable Diffusion and vae-ft-ema-560000-ema-pruned.safetensors – click <Apply settings> (apply settings). Ready!

Now the generated images are most likely to be free of artifacts, defects and blemishes on faces!