Flow Matching & Rectified Flows: The Recipe Behind Modern AI Image and Video Models

2 Просмотры
Издатель
Why do Stable Diffusion 3, FLUX, Meta's Movie Gen, HunyuanVideo and Wan all train with flow matching rather than classic diffusion? In this video, we build the idea from the ground up, starting with diffusion and its curved paths, then moving through continuous flows and the continuity equation to flow matching, rectified flow and the reflow procedure, which can reduce sampling-path curvature. One surprising connection is that, for common independent Gaussian corruption paths, diffusion and flow-matching formulations can be converted into one another when time parameterizations and loss weightings are aligned. What changes, and why does it matter for huge image and video models?

All formulas are shown on screen; the narration explains the intuition behind each one.

What you'll learn:
- How diffusion turns noise into images, and why curved paths cost compute
- Neural ODEs, continuous normalizing flows and the continuity equation
- The flow matching objective and the conditional trick that makes it trainable
- Rectified flow, reflow, straightness and one-step generation (InstaFlow)
- Minibatch optimal transport couplings
- How Gaussian diffusion and flow formulations connect, and where the equivalence needs assumptions
- Stable Diffusion 3 (logit-normal timesteps, MMDiT), FLUX.1 and FLUX.2
- Flow matching in video (Movie Gen, HunyuanVideo, Wan 2.1), audio and robotics (π0)
- The race to one-step generation: MeanFlow

## Chapters

00:00 Why the path from noise to image matters
00:58 What you'll learn
01:47 Generative modeling as transporting probability
02:33 Diffusion recap: forward noising
03:25 Probability flow ODE and curved paths
04:18 Why curved paths cost compute
05:13 Neural ODEs & continuous normalizing flows
06:08 The continuity equation
06:56 2022: three papers, one idea
07:44 The flow matching objective
08:30 Conditional flow matching: the key trick
09:25 Why averaging simple paths works
10:10 Diffusion paths vs. optimal transport paths
11:14 Rectified flow: just draw a straight line
12:00 The training loop in eight lines
12:46 Sampling with Euler steps
13:30 Why learned paths still bend
14:22 Reflow: re-pairing noise and data
15:22 Measuring straightness
16:12 InstaFlow: one-step text-to-image
16:58 Minibatch optimal transport
17:50 How diffusion and flow connect
18:49 Four things that change
19:55 Stable Diffusion 3 & logit-normal sampling
20:39 MMDiT and smooth scaling
21:25 FLUX.1 and FLUX.2
22:19 Classifier-free guidance for flows
23:03 Video: Movie Gen, HunyuanVideo, Wan
23:57 Why flow matching fits video models
24:48 Speech, robotics and science
25:30 One-step generation: MeanFlow
26:42 Limits and open questions
27:33 Recap
28:18 Outro

## Papers & Sources

- Denoising Diffusion Probabilistic Models, by Ho, Jain, and Abbeel (NeurIPS 2020): [Source](https://arxiv.org/abs/2006.11239)
- Score-Based Generative Modeling through Stochastic Differential Equations, by Song et al. (ICLR 2021): [Source](https://arxiv.org/abs/2011.13456)
- Neural Ordinary Differential Equations, by Chen, Rubanova, Bettencourt, and Duvenaud (NeurIPS 2018): [Source](https://arxiv.org/abs/1806.07366)
- Flow Straight and Fast: Learning to Generate and Transfer Data with Rectified Flow, by Liu, Gong, and Liu (ICLR 2023): [Source](https://arxiv.org/abs/2209.03003)
- Building Normalizing Flows with Stochastic Interpolants, by Albergo and Vanden-Eijnden (ICLR 2023): [Source](https://arxiv.org/abs/2209.15571)
- Flow Matching for Generative Modeling, by Lipman, Chen, Ben-Hamu, Nickel, and Le (ICLR 2023): [Source](https://arxiv.org/abs/2210.02747)
- InstaFlow: One Step is Enough for High-Quality Diffusion-Based Text-to-Image Generation, by Liu et al. (ICLR 2024): [Source](https://arxiv.org/abs/2309.06380)
- Improving and Generalizing Flow-Based Generative Models with Minibatch Optimal Transport, by Tong et al. (TMLR 2024): [Source](https://arxiv.org/abs/2302.00482)
- Multisample Flow Matching: Straightening Flows with Minibatch Couplings, by Pooladian et al. (ICML 2023): [Source](https://arxiv.org/abs/2304.14772)
- Diffusion Meets Flow Matching: Two Sides of the Same Coin (research tutorial, 2024): [Source](https://diffusionflow.github.io/)
- Scaling Rectified Flow Transformers for High-Resolution Image Synthesis, by Esser et al. (Stable Diffusion 3, ICML 2024): [Source](https://arxiv.org/abs/2403.03206)
- FLUX.1, from Black Forest Labs: [Source](https://github.com/black-forest-labs/flux)
- FLUX.2 and [klein] specifications and releases, from Black Forest Labs: [Source](https://github.com/black-forest-labs/flux2)
- Movie Gen: A Cast of Media Foundation Models, from Meta (2024): [Source](https://arxiv.org/abs/2410.13720)
- HunyuanVideo: A Systematic Framework for Large Video Generative Models, by Kong et al. (2024): [Source](https://arxiv.org/abs/2412.03603)

#FlowMatching #GenerativeAI #DiffusionModels #MachineLearning #DeepLearning
Категория
AI Картинки
Выполните вход или зарегистрируйтесь для отправки комментария.
Комментариев нет.