MIT 6.S184: Introduction to Flow Matching and Diffusion Models¶
Abstract
Latest updates related to this course can be found at the bottom of this page.
- Website: Latest version
- Labs: Zicx's repo (2025 Spring)
My learning steps:
- Review lecture videos and capture key insights from the slides.
- Apply theoretical concepts by completing the corresponding lab assignments.
- Consolidate learning by refining personal notes against the provided lecture notes.
Table of Contents¶
Lecture Notes¶
- Lecture 1: Flow and Diffusion Models
- Lecture 2: Constructing a Training Target
- Lecture 3: Training Flow and Diffusion Models
- Lecture 4: Building an Image Generator
Labs¶
Recap¶

Resources¶
Continuously updated resources related to Flow Matching and Diffusion Models.
- Towards End-to-End Generative Modeling: Talk by Kaiming He, CVPR 2025 Workshop
- Flow Matching for Generative Modeling: NeurIPS 2024 Tutorial
- Diffusion Meets Flow Matching: Two Sides of the Same Coin
- An introduction to flow matching by Cambridge Machine Learning Group
- 深入解析 Flow Matching 技术
- facebookresearch/flow_matching: FM 的作者团队实现的 Flow Matching 代码库
- atong01/conditional-flow-matching: Conditional Flow Matching 代码库
- haidog-yaqub/MeanFlow: 非官方实现的 MeanFlow 代码库
Updates¶
MeanFlow Model¶
️Detailed Introduction
- Paper: 2505.13447 - arXiv
- Video: One Step, Big Leap - YouTube
何恺明的新工作,提出了一种名为 MeanFlow 的生成模型框架,目标是实现高效的one-step 图像生成。 MeanFlow 的核心思想是引入并建模 平均速度(average velocity)的概念,论文从平均速度的定义出发,推导出了一个关键的 MeanFlow 恒等式(MeanFlow Identity),它描述了平均速度与瞬时速度及其时间导数之间的关系。 论文训练一个神经网络来直接预测这个平均速度场,并使用 MeanFlow 恒等式作为 training target.
Diffusion Meets Flow Matching¶
️Detailed Introduction
这篇博客介绍了 Diffusion 和 Gaussian Flow Matching(GFM) 这两种生成框架的相似性和联系,指出它们在数学上是等价的,并且可以相互转换。
对于 GFM, 我们会发现结果和上式在网络输出为 \(\hat{\mathbf{u}}\) 的时候是等价的。
Diffusion with DDIM sampler == Flow matching sampler (Euler).
DDIM 采样器可视为重参数化采样 ODE 的一阶 Euler 采样器,其对不同的网络输出采用相同的更新规则,如果网络是一个高阶的 ODE 求解器,那么 DDIM 采样的误差就会和 FM 相差很大。
DDIM 对噪声调度中的线性缩放具有不变性(invariant)
Flow matching weighting == diffusion weighting of \(\mathbf{v}\)-MSE loss + cosine noise schedule.
权重函数(Weighting Function) 是损失函数中最重要的部分,它平衡了图像、视频和音频等感知数据中高频与低频成分的重要性,FM 的权重函数与 Diffusion 常见的 \(\mathbf{v}\)-MSE 损失函数中的权重函数相同。
Takeaways: Gaussian Flow Matching 为该领域带来了两种新模型规范
- Network output: a vector field parametrization of the network output.
- Sampling noise schedule: a simple linear noise schedule.