diffusersRepository55/100 via “vae latent encoding and decoding with quality-speed tradeoffs”
🤗 Diffusers: State-of-the-art diffusion models for image, video, and audio generation in PyTorch.
Unique: Uses a learned latent space (AutoencoderKL) that compresses images 64x while preserving semantic content, enabling diffusion to operate on 8x8 latents instead of 512x512 pixels. This reduces memory and computation by 64x compared to pixel-space diffusion, while the VAE decoder reconstructs high-resolution images from latents. The latent space is learned jointly with the diffusion model, ensuring compatibility.
vs others: More efficient than pixel-space diffusion because it reduces the spatial resolution from 512x512 to 8x8, cutting memory and computation by 64x. Outperforms naive downsampling because the VAE learns a semantically meaningful latent space that preserves image content while removing high-frequency noise.