Flow Matching and Diffusion Models Explained
Introduction Flow matching and diffusion models generate images, videos, and other kinds of data by gradually transforming random noise into new samples. I first encountered diffusion models in 2022 through latent diffusion models such as Stable Diffusion 1.5, and I have been working with them since 2023. As a machine learning practitioner, I found training these models much easier than understanding why they worked. With the available tools, enough data, and enough compute, I could train models for production without fully understanding their mathematical foundations. I trained many such models, but my impostor syndrome kept haunting me anyway. Apart from keeping that inner voice quiet, I wanted to understand how these models work and, more importantly, why they work. Most explanations I found were either too mathematically heavy for a humble ML practitioner like me or so simplified that they missed the point. ...