vae-diffusion

VAE and Diffusion Models: A Step-by-Step Guide

DOI

This repository contains educational Jupyter notebooks that explore the theory and implementation of generative models, specifically Variational Autoencoders (VAEs) and Diffusion Models. These notebooks are designed to provide a clear, step-by-step understanding of how these powerful generative AI techniques work.

đź“– Blog Post: For a gist and overview of the concepts covered in this repository, check out the accompanying blog post: From VAEs to Diffusion Models: A Step-by-Step Journey


🚀 Installation

To run the notebooks in this repository, you’ll need Python 3.8+ and the following dependencies:

pip install 'torch>=2.0.0' 'torchvision>=0.15.0' 'matplotlib>=3.5.0' 'tqdm>=4.64.0'

The main dependencies are:


📚 What You’ll Learn


🗂️ Notebook Overview

01.vae.ipynb – Variational Autoencoders

This notebook covers the fundamental concepts of Variational Autoencoders (VAEs):


02.vae-without-encoder.ipynb – Simplified VAE (Decoder-Only)

This notebook explores a “VAE-like” model that omits the encoder:


03.diffusion.ipynb – Diffusion Models

This comprehensive notebook dives into diffusion models:


Next