Stability AI's SDXL-VAE Sharpens Image Detail for Any Diffusion Pipeline
Stability AI publishes SDXL-VAE, an MIT-licensed autoencoder retrained at a larger batch size with EMA weights that beats the original kl-f8 on every reconstruction metric.
ProTakeaways
- Stability AI released SDXL-VAE on Hugging Face under an MIT license.
- Same kl-f8 architecture as original SD VAE, retrained at batch size 256 with EMA weights.
- Beats original on COCO 2017: rFID 4.42 vs 4.99, PSNR 24.7 vs 23.4.
- 83.7M parameters, safetensors format, drop-in via Diffusers AutoencoderKL.
- Improves local high-frequency details and face reconstruction, not semantics or composition.
- Already adopted as a base component in OmniGen, JanusFlow, Lumina, and 10+ finetunes.
Stability AI has released SDXL-VAE on Hugging Face, publishing the improved autoencoder that ships inside Stable Diffusion XL as a standalone, MIT-licensed checkpoint. The 83.7M-parameter model is a drop-in replacement for the original Stable Diffusion VAE, available for developers to plug into their own diffusion pipelines without running the full SDXL stack.
Pixel outputs from latent diffusion models often look slightly soft or lose fine texture because of the VAE. The diffusion process operates in a compressed latent space produced by an autoencoder and never touches pixels directly; the decoder converts those latents back into an image. SDXL-VAE is a fine-tuned version of that decoder, retrained by Stability AI to improve on the autoencoder used in the original Stable Diffusion model.
What changed under the hood
The architecture is identical to the original kl-f8 autoencoder from the latent diffusion paper: an 8x spatial downsampler with a 4-channel latent space. The improvement comes from the training recipe. Stability retrained the same architecture with a much larger batch size (256 versus the original 9) and tracked weights with an exponential moving average, which smooths out training noise and typically yields sharper reconstructions.
Unlike the earlier sd-vae-ft-mse release, which was a decoder-only tweak, SDXL-VAE was retrained from scratch, meaning both encoder and decoder weights are new.
Benchmark numbers on COCO 2017
Stability published a head-to-head reconstruction benchmark on 5,000 validation images from COCO 2017 at 256x256:
| Model | rFID | PSNR | SSIM | PSIM |
|---|---|---|---|---|
| SDXL-VAE | 4.42 | 24.7 | 0.73 | 0.88 |
| Original kl-f8 | 4.99 | 23.4 | 0.69 | 1.01 |
| ft-MSE | 4.70 | 24.5 | 0.71 | 0.92 |
SDXL-VAE leads on every metric, including the perceptual similarity score PSIM where lower is better. The gains are modest in absolute terms but consistent, and they compound across every image a diffusion model generates.
Dropping it into a Diffusers pipeline
Swapping the VAE into an existing pipeline takes two lines:
from diffusers.models import AutoencoderKL
from diffusers import StableDiffusionPipeline
vae = AutoencoderKL.from_pretrained("stabilityai/sdxl-vae")
pipe = StableDiffusionPipeline.from_pretrained(
"stabilityai/your-stable-diffusion-model", vae=vae
)
Weights ship in safetensors format under the MIT license, which permits commercial use without additional terms.
Where it helps and where it doesn't
- Better at: local high-frequency details, textures, and faces. The latent diffusion model handles semantic composition; the VAE handles pixel-level fidelity, so improving the autoencoder is the lever for recovering fine detail in generated images.
- Neutral on: prompt following, composition, and global structure. Swapping the VAE won't fix bad hands or unreadable text, which are U-Net and text-encoder problems.
- Compatibility caveat: because SDXL-VAE was retrained from scratch, its latent space statistics differ slightly from the original kl-f8. Users have reported occasional NaN issues in fp16, which is why many workflows run it in bf16 or fp32.
- Two versions exist: 0.9 and 1.0 are both available, though parts of the community consider 0.9 the better-looking of the two.
A reusable building block beyond SDXL
The VAE is one of the most reused components in modern generative AI, already appearing as a building block in newer systems like OmniGen, JanusFlow, and Lumina, with dozens of downstream fine-tunes listing it as a base model. Publishing it as a clean, independently versioned checkpoint under MIT means anyone building a latent diffusion model, a video diffusion model, or a multimodal system that needs a well-behaved image tokenizer can adopt a proven encoder-decoder pair without training one from scratch.
For teams still running SD 1.5-era pipelines, the payoff is smaller but immediate: a free quality bump on reconstructions with no changes to the U-Net, no retraining, and roughly the same inference cost.