Diffusion Models
Stable Diffusion was one of the first Open-Souce Text to Image model that could generate high quality images. However, the maths behind it is fairly complex and this blog aims to simplify it. Before understanding Diffusion Models, we need to understand a type of generative model called Energy Based Models. Energy Based Models Recommended reading: How to Train Your Energy-Based Models https://www.youtube.com/watch?v=8TcNXi3A5DI Let us say we have an image dataset $X = \{ x_1, x_2, \dots, x_n \}$, where $ x_i \in \mathbb{R}^d $. Our goal is to learn an energy function $ E_\theta(x) $ that should be low for the images in the dataset and high for all other images. Here $\theta$ are the parameters of the energy function. These functions, similar to pdfs, can be used to model and generate new data points. ...