This repo implements a DiT-based conditional flow model heavily inspired by Stable Diffusion 3.
Our image generation pipeline has two main components:
-
A variational autoencoder (VAE) trained to encode 128×128 RGB CelebA images into a compact 16-channel, 16×16 latent space
-
A diffusion transformer (DiT) trained with classifier-free guidance to model the distribution of those latent codes conditioned on CelebA's 40 binary facial attributes (we do not use a text encoder to save on compute). At inference time, the DiT generates latent samples which are decoded by the VAE back to full-resolution faces.
Note: the images folder is just for images that appear in the notebook. It does not have any significance on its own.
- High-Resolution Image Synthesis with Latent Diffusion Models -> Latent Diffusion Model paper (April 2022)
- Scalable Diffusion Models with Transformers -> DiT paper (March 2023)
- Flow Straight and Fast: Learning to Generate and Transfer Data with Rectified Flow -> Rectified Flow paper (Sep 2022)
- Scaling Rectified Flow Transformers for High-Resolution Image Synthesis -> Stable Diffusion 3 paper (March 2024)
- Z-Image: An Efficient Image Generation Foundation Model with Single-Stream Diffusion Transformer -> Z-Image paper (Jul 2026)
- The Unreasonable Effectiveness of Deep Features as a Perceptual Metric -> LPIPS paper (April 2018)
- Image-to-Image Translation with Conditional Adversarial Networks -> PatchGAN paper (Nov 2018)
- Hierarchical Implicit Models and Likelihood-Free Variational Inference -> Hinge Loss Paper (Nov 2017)
- EQ-VAE: Equivariance Regularized Latent Space for Improved Generative Image Modeling -> EQ-VAE paper (Aug 2025)