Flow Matching Models from Scratch in PyTorch

Table of Contents Part 0: Setup Part A: Sampling Loops 1.1 Implementing the Forward Process 1.2 Classical Denoising 1.3 One-Step Denoising 1.4 Iterative Denoising 1.5 Diffusion Model Sampling 1.6 Classifier-Free Guidance (CFG) 1.7 Image-to-Image Translation 1.8 Visual Anagrams 1.9 Hybrid Images Part B: Flow Matching from Scratch! 1. Single-Step Denoising UNet 2. Training a Diffusion Model