Diffusion & Flow Matching in 2D

How generative models turn noise into data — and why the path decides how many steps they need.

Diffusion models and flow matching power today's image and video generators. Both learn to turn random noise into data, but they follow different paths from noise to data — and that path determines how many sampling steps (network calls) you need to generate a good sample. This playground shows both side by side on 2D toy datasets, so every point and every path is visible.

Follow the five-step guide: see the training data, watch the forward process blend it with Gaussian noise, explore the arrows the network learns (the velocity field that points back toward the data at each noise level), then generate new samples by starting from noise and following the arrows with an Euler solver.

Finally, reduce the number of sampling steps and compare. Diffusion (DDPM, linear β schedule) does most of its moving just before the end, so a few large steps miss the data; flow matching moves at a steadier pace along straighter paths and stays accurate with far fewer steps. The chart shows the sample error for every step budget. To keep it exact and instant, the tool uses the optimal field for each dataset instead of a trained network.

Schedule a meeting