概念 · Module 4 / Flow Matching

Consistency Models

— 把整条 PF-ODE 轨迹折叠到同一个端点:一步出图。

很多人以为 Consistency Models 就是"把蒸馏推到极致——从 2 步压到 1 步"。这是把它和 progressive distillation(Salimans & Ho, 2022)混了。CMU 10799 Lecture 10 的讲师明确把这条思路提出来当反例:先逐级砍半(1000→500→…→1),可行但训练代价随步数爆炸;Consistency Models 的真正洞见是"为什么只压两步?干脆一口气压到底"。

「为什么只匹配两步?为什么不直接匹配四步?再 dream bigger,为什么不直接跳到终点?」—— CMU L10 @05:11

讲师当场把这个"梦更大"的提议交给学生讨论,学生答出来三种困难:分布太复杂、缺少中间监督、训练采样过贵。Consistency Models(Song et al. 2023)正是为这三件事而生。

🟡 教材外补充:可以把 PF-ODE 想成一条"从噪声 $x_T$ 流向数据 $x_\epsilon$"的河道。Diffusion 是逐节顺流而下;Consistency Models 训练的是一个"传送函数"——你从河道上任何一个位置 $x_t$ 出发,它都把你瞬间送到河口 $x_\epsilon$。"同一条河上、传送终点必须一致" 就是 consistency 这个词的字面意思。

从 Progressive Distillation 到一步生成

讲师在 Lecture 10 把整条思路按这个梯度推进——你要先抓住这个梯度,才能看懂 Consistency Models 是哪一步的解法。

蒸馏阶梯(CMU L10 现场推导)
  1. 原模型 1000 步 → 新模型 V1 一步顶 2 步 DDIM;速度 ×2。
  2. 再蒸 V2 一步顶 V1 的 2 步 → ×4;再蒸 V3 → ×8;共 $\log_2 T$ 轮 → Progressive Distillation。
  3. "为什么不直接一步顶 $T$ 步?"——这就是 Consistency Models 想做的事。

一致性属性

设 PF-ODE 解出的一条轨迹经过 $\{x_t : t \in [\epsilon, T]\}$。Consistency Models 学函数 $f_\theta(x_t, t)$ 满足:

$$f_\theta(x_t, t) = f_\theta(x_{t'}, t') = x_\epsilon, \quad \forall (x_t, t), (x_{t'}, t') \text{ on the same trajectory.}$$

Why:这条等式才是"一步采样"的真身——任意一个噪声点 $x_T$ 都应该被 $f_\theta(x_T, T)$ 直接送回它对应的 $x_\epsilon$,无需沿 ODE 数值积分。

边界条件与参数化

函数 $f_\theta$ 不是凭空学出来的。必须钉死一个锚点——边界条件:

$$f_\theta(x_\epsilon, \epsilon) = x_\epsilon.$$

Why:如果 $f_\theta$ 在 $t=\epsilon$ 处都偏离恒等映射,整条轨迹的"终点估计"就会系统性地漂移;钉死边界后,$f_\theta$ 就被约束成"PF-ODE 轨迹的端点投影"而不是任意一个函数。

实现边界条件不靠正则项,而靠参数化:

$$f_\theta(x, t) = c_{\text{skip}}(t)\,x + c_{\text{out}}(t)\,F_\theta(x, t),$$

其中 $c_{\text{skip}}(\epsilon) = 1, c_{\text{out}}(\epsilon) = 0$。Why:在 $t = \epsilon$ 处,$f_\theta$ 自动塌缩成 $x$ 本身,神经网络 $F_\theta$ 输出多少都不影响——边界条件被代数地内置了,而不是被 loss 慢慢学出来。

两种训练范式

论文给了两条路,区别只在"PF-ODE 上相邻两点怎么来":

  • CD(Consistency Distillation):已有预训练的 diffusion 教师 $\phi$。用 $\phi$ 跑一步 ODE solver 拿到 $\hat x_t = \text{ODESolve}(x_{t+1}, t+1, t; \phi)$。Why:教师定义了"同一条轨迹",学生只学一致性。
  • CT(Consistency Training):完全不要教师。直接用前向加噪 $x_t = x_0 + t \cdot z, x_{t+1} = x_0 + (t+1) \cdot z$ 同一个 $z$ 同一个 $x_0$。Why:同一个 $(x_0, z)$ 决定一条 PF-ODE 轨迹(在 Karras EDM 公式下严格成立),所以两个点天然同轨迹——免去教师网络。

EMA 目标网络 + 损失

训练目标用一个慢更新的目标网络 $\theta^-$(EMA of $\theta$)当"老师",自己监督自己:

$$\mathcal{L} = \mathbb{E}\left[ d\big(f_\theta(x_{t+1}, t+1),\; f_{\theta^-}(x_t, t)\big) \right],$$

$d$ 一般是 $\ell_2$ 或 LPIPS。Why:如果用 $\theta$ 自己监督自己,相当于在拟合自己的输出,梯度方向不稳定,会塌成常数函数。EMA 把"老师"冻在过去几千步的平均权重上,提供一个准平稳的回归目标,类似 RL 里的 target network。

x_T(纯噪声) x_ε(数据端) x_T x_{t'} x_t x_ε 同一条 PF-ODE 轨迹上的任意 (x_t, t) → 同一个 x_ε

多步 Consistency Sampling

一步生成质量不够时,可以"加噪 + 再投回"反复几轮:

$$\hat x_0 = f_\theta(x_T, T);\quad x_{t_k} = \hat x_0 + \sigma_{t_k} z;\quad \hat x_0 \leftarrow f_\theta(x_{t_k}, t_k).$$

Why:每一轮重新注入噪声,让 $f_\theta$ 在不同位置都做一次"折回端点"。2–4 步通常就能把 FID 再压一截,这是 LCM 在 SD 1.5 上 4 步出图的核心机制。

注意看什么不变量:点击下面任一个 $(x_t, t)$,红色箭头都会把它送到同一个绿色端点 $x_\epsilon$——这就是 consistency 的字面定义。曲线(PF-ODE 轨迹)只是参考,$f_\theta$ 并不沿曲线走。

$f_\theta(x_T, T) = x_\epsilon$ —— 一步从最高噪声跳回数据端。
$f_\theta(x_{t'}, t') = x_\epsilon$ —— 早期点也映到同一终点。
$f_\theta(x_t, t) = x_\epsilon$ —— 中期点同样映到同一终点。
$f_\theta(x_\epsilon, \epsilon) = x_\epsilon$ —— 边界条件:在端点处就是恒等映射。

手算 CT 一步训练

设 $x_0 = 2.0, z = 1.0$,时间步取 $t = 0.5, t+1 = 1.5$(EDM-style 连续时间)。先构造同一条轨迹上两个点:

$x_t = x_0 + t \cdot z = 2.0 + 0.5 \cdot 1.0 = 2.5$;$x_{t+1} = x_0 + (t+1) \cdot z = 2.0 + 1.5 \cdot 1.0 = 3.5$。

假设当前 $\theta$ 给出 $f_\theta(3.5, 1.5) = 1.8$、EMA 网络给出 $f_{\theta^-}(2.5, 0.5) = 2.05$。则:

$\mathcal{L} = (f_\theta(x_{t+1}, t+1) - f_{\theta^-}(x_t, t))^2 = (1.8 - 2.05)^2 = (-0.25)^2 = 0.0625$。

梯度只穿过 $f_\theta$(在线网络),不穿过 $f_{\theta^-}$(EMA 目标,.detach())。训练若干步后两端会一起收敛到真实端点 $x_0 = 2.0$。

常见误区

  1. "Consistency Models 就是把 progressive distillation 推到 1 步。"反例:PD 需要 $\log_2 T$ 轮、每轮一个新教师,CIFAR-10 上 $T=1000$ 要训 10 个学生模型;Consistency Models 一轮端到端搞定,且 CT 模式连教师都不要——是结构不同,不是步数不同。
  2. "边界条件 $f_\theta(x_\epsilon, \epsilon) = x_\epsilon$ 是损失里加一项罚出来的。"反例:实际靠参数化 $f = c_{\text{skip}}(t) x + c_{\text{out}}(t) F_\theta$ 配合 $c_{\text{skip}}(\epsilon)=1, c_{\text{out}}(\epsilon)=0$ 代数内置。$L_{\text{boundary}}$ 这一项不存在。
  3. "一步生成的 FID 一定比多步差很多。"反例:Song et al. 2023 在 CIFAR-10 上 1 步 FID ≈ 3.55(CD),DDPM 同模型用完整 1000 步 ≈ 3.17——差距只在 0.4 个 FID。质量退化没有想象中悬崖式。

相关概念

  • Rectified Flow · 另一条"把曲线轨迹拉直成一步"的思路
  • DDIM · Consistency Models 的多步采样基于 DDIM 的 ODE 视角
  • Probability Flow ODE · "同一条轨迹"的形式化载体
  • v-Prediction · Progressive Distillation 推荐的参数化,常与 Consistency 联用

来源

  1. cmu-10799-diffusion-flow · L10 · Distillation, Consistency Models & Flow Maps · 为什么需要蒸馏 · (0:04)
  2. cmu-10799-diffusion-flow · L10 · 1 步顶 2 步 DDIM → Progressive Distillation · (2:00)
  3. cmu-10799-diffusion-flow · L10 · "dream bigger:直接跳 t 步"动机段 · (5:11)
  4. cmu-10799-diffusion-flow · L10 · 训练采样代价 $T$ 次前向问题 · (7:23)

🟡 教材外补充:Song et al. 《Consistency Models》ICML 2023,arXiv:2303.01469。下游工程化:LCM(Latent Consistency Models, Luo et al. 2023)把它搬到 Stable Diffusion latent space;SDXL Turbo(Sauer et al. 2023)和 Flash Diffusion 进一步把 ADD(adversarial diffusion distillation)和 consistency 思路结合,实现 1–4 步出图,是今天实时图像生成产品(如 Krea、Fal、Replicate Lightning)的技术底座。

查看 85 条课程原文出处
CourseLectureTimeExcerpt
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 00: 04 Okay. So, previously uh we have learned Okay. So, previously uh we have learned about fast sampling techniques, right? about fast sampling techniques, right? about fast sampling techniques, right? And…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 00: 59 pre-trained model, right? So suppose we already have a pre-trained diffusion already have a pre-trained diffusion already have a pre-trained diffusion model like before. Um then what is the model like…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 02: 00 second time step we do a loss comparison with the 500 time step. Hey yes very with the 500 time step. Hey yes very with the 500 time step. Hey yes very very good very good very very good very good ver…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 02: 45 t and uh how about okay let's just do a few more steps right how about we'll few more steps right how about we'll few more steps right how about we'll train a new model such that um like one train a n…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 03: 44 A So this is like yep >> exact as >> exact as >> exact as many as you want essentially. So like many as you want essentially. So like many as you want essentially. So like log to t I guess. log to t I…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 04: 30 Right. Right. >> So if in the first example we took the >> So if in the first example we took the >> So if in the first example we took the two two two steps to V1 of my new models step and in steps t…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 05: 11 way this is the paper that tells you that you should do V prediction like V that you should do V prediction like V that you should do V prediction like V prediction is the best parameterization predic…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 05: 59 >> Oh, why wouldn't it be a good model? I >> Oh, why wouldn't it be a good model? I guess guess guess Marco, Marco, Marco, >> you still have to learn the same amount >> you still have to learn the sam…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 06: 44 network's job to just take this teeny tiny Gaussian to that complex version tiny Gaussian to that complex version tiny Gaussian to that complex version without getting enough. So it's very without get…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 07: 23 what about like the feasibility of training this kind of model like how training this kind of model like how training this kind of model like how about let's just look at uh training a about let's jus…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 08: 17 to take a very long time and it's like if you try to scale it up to t time if you try to scale it up to t time if you try to scale it up to t time steps, right? Uh let me finish maybe. Um steps, right…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 08: 54 sounds kind of not great. Yeah hold on. Yeah, Yeah, Yeah, >> I think the four power could only be for >> I think the four power could only be for >> I think the four power could only be for the teache…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 09: 31 just going to become very slow. So, so do you think that like five total So, so do you think that like five total So, so do you think that like five total four of the teacher student four of the teach…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 10: 18 here >> um and what was the question >> um and what was the question >> um and what was the question step. step. step. >> Yeah. >> Yeah. >> You said you require like four forward >> You said you requi…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 11: 02 That's your forward pass. That's your forward pass. >> Yeah but just create a new data set with >> Yeah but just create a new data set with >> Yeah but just create a new data set with this feature mod…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 11: 37 yeah. Um, so what do we think? Is it possible to train a model that goes from possible to train a model that goes from possible to train a model that goes from t directly xt directly to x0? What do we…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 12: 30 right even even if you stop red over there it's not good right okay so anyway there it's not good right okay so anyway there it's not good right okay so anyway let's take a look at this uh problem let…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 13: 15 yeah, what does it mean is that basically for any two points like any basically for any two points like any basically for any two points like any arbitrary two points on the same OD arbitrary two poin…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 14: 26 is this the only criteria that we need for this new model to generate something for this new model to generate something for this new model to generate something to to generate the correct thing? to t…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 15: 13 like there it says nothing about the output, right? Like we have no guarantee output, right? Like we have no guarantee output, right? Like we have no guarantee about what the output should look like a…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 16: 03 condition essentially so this is the condition essentially so this is the thing that's going to like basically thing that's going to like basically thing that's going to like basically just like make …
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 16: 48 B or something. It's like the when when B or something. It's like the when when your gradient of the the loss spikes up. your gradient of the the loss spikes up. your gradient of the the loss spikes u…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 17: 42 consistency model he was at open eye and then now he's apparently some big name then now he's apparently some big name then now he's apparently some big name in meta super intelligence lab or in meta …
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 18: 26 DDPM. Yeah. Yeah. So, that guy is also a DDPM. Yeah. Yeah. So, that guy is also a genius and he's now has his own startup. genius and he's now has his own startup. genius and he's now has his own star…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 19: 15 green one which is like only one step away is the one that we're going to use away is the one that we're going to use away is the one that we're going to use here. So essentially basically what's here…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 20: 01 next time step that is getting on the same trajectory solved by our solver. same trajectory solved by our solver. same trajectory solved by our solver. and the original teacher model. So this and the …
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 20: 47 just going to become a little bit messier if you if you do not use L2 but messier if you if you do not use L2 but messier if you if you do not use L2 but in practice in practice in practice uh percept…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 21: 41 plus delta t? plus delta t? >> Ah, that's also another great question. >> Ah, that's also another great question. >> Ah, that's also another great question. So, uh here everything so this f theta So, …
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 22: 24 that you need to take from the t-shirt doesn't scale with t. Yeah. Uh, okay. Do doesn't scale with t. Yeah. Uh, okay. Do doesn't scale with t. Yeah. Uh, okay. Do you want your first you want your firs…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 23: 13 with the larger jump. We do not update with the larger jump. We do not update our model with the with the shorter our model with the with the shorter our model with the with the shorter jump. jump. ju…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 24: 31 parameterization that we're using sort of and uh so we are trying to predict of and uh so we are trying to predict of and uh so we are trying to predict the clean data and um usually it the clean data…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 25: 39 when t is zero the skip connection is when t is zero the skip connection is one and then the output the weight is one and then the output the weight is one and then the output the weight is zero right…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 26: 26 can be producing garbage. Right now all this saying is that if my model sees a this saying is that if my model sees a this saying is that if my model sees a very good image already and also is the ver…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 27: 09 think I don't I I agree with the thing that like the loss function on the last that like the loss function on the last that like the loss function on the last line can if you just do training with lin…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 27: 53 should not because if we just ask it to do the same thing at S and T that same do the same thing at S and T that same do the same thing at S and T that same thing could just be end up predicting thing…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 28: 37 this. Sorry. The the skip connection weight is kind of like a schedule. It weight is kind of like a schedule. It weight is kind of like a schedule. It has a scheduling. It's only one when has a schedu…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 29: 33 trajectory that's like kind of similar trajectory that's like kind of similar to what we what we would have got from a to what we what we would have got from a to what we what we would have got from a…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 30: 25 scale differently essentially. So that scale differently essentially. So that so that it's like slightly less noisy. so that it's like slightly less noisy. so that it's like slightly less noisy. Uh th…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 31: 20 about the previous uh slide, but >> uh so if we if we already know that the >> uh so if we if we already know that the >> uh so if we if we already know that the image is close enough to x0 where it's…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 31: 59 boundary condition. Yeah. Okay. All right. Any any questions about training right. Any any questions about training right. Any any questions about training consistency model from scratch? consistency …
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 32: 50 Um and we're not trying to solve it here. Well we kind of are trying to here. Well we kind of are trying to here. Well we kind of are trying to solve it here actually. Um solve it here actually. Um so…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 33: 47 So one step but how do you do multi-step right? Can you even do multi-step? right? Can you even do multi-step? right? Can you even do multi-step? >> Yeah like we're turning on a lot of like >> Yeah li…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 34: 20 >> Why do you want to do that's a great question. The next slide is going to question. The next slide is going to question. The next slide is going to answer that. Yeah. answer that. Yeah. answer that…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 35: 04 or compute that you can afford to do four step generation say but like this four step generation say but like this four step generation say but like this model is not trained for that it doesn't model…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 35: 44 do whatever I guess. Yeah, doesn't do whatever I guess. Yeah, doesn't really matter anymore. Um yeah so really matter anymore. Um yeah so really matter anymore. Um yeah so essentially essentially esse…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 36: 50 >> instead of doing like this one step to >> instead of doing like this one step to the final noise you can do it like two the final noise you can do it like two the final noise you can do it like two…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 37: 27 be able to jump to any point from any point to any point. Um so yeah so this point to any point. Um so yeah so this point to any point. Um so yeah so this xt is also arbitrary so you should be xt is a…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 38: 20 >> Like two points on the trajectory then you saw the you saw the OD between them you saw the you saw the OD between them you saw the you saw the OD between them and then you essentially just take the…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 39: 04 meaningful when you're dealing with clean data. So think about it right the clean data. So think about it right the clean data. So think about it right the perceptual loss is like something like a per…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 39: 52 perceptual distance between the final X0 perceptual distance between the final X0 output. Um the only thing that you need output. Um the only thing that you need output. Um the only thing that you nee…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 40: 30 >> Yeah. Yeah. So like basically so the this the first part uses solvers so that this the first part uses solvers so that this the first part uses solvers so that this thing this part is actually on t…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 41: 18 im style at at noise bag thing right and and that's still valid actually in the and that's still valid actually in the and that's still valid actually in the in the paper like we have this thing in th…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 42: 02 kicked off that >> uh what do you mean? Oh you mean like >> uh what do you mean? Oh you mean like >> uh what do you mean? Oh you mean like the the Oh yeah. So so like you mean the the Oh yeah. So so l…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 42: 59 Yeah. But basically because we do not Yeah. But basically because we do not always match the end point now we we always match the end point now we we always match the end point now we we instead of a …
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 43: 52 score right from jumping from T. Now um you you get your exact log likelihood you you get your exact log likelihood you you get your exact log likelihood back by because you can take the back by becau…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 44: 43 change that you're going from a that you're going from any point should you're going from any point should you're going from any point should follow the instant like the tangent line follow the instan…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 45: 30 when S is not equal to T and then score when S is not equal to T and then score matching loss which is just go from T to matching loss which is just go from T to matching loss which is just go from T …
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 46: 13 >> Uh which one? Uh you're saying that we >> Uh which one? Uh you're saying that we add like a discriminator to improve FID add like a discriminator to improve FID add like a discriminator to improve …
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 47: 17 otherwise it doesn't make sense I guess. Yeah. >> Yeah. Oh sorry. Yeah. >> Yeah. Oh sorry. Yeah. >> How do you weigh the different loss >> How do you weigh the different loss >> How do you weigh the d…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 48: 24 so I guess someone asked right do Do you so I guess someone asked right do Do you even need a solver here? Uh the answer even need a solver here? Uh the answer even need a solver here? Uh the answer i…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 49: 20 Is it just like all the questions are like, "Oh, the thing that we're going to like, "Oh, the thing that we're going to like, "Oh, the thing that we're going to talk about next." Very nice. Okay. talk…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 50: 04 OD or PD or whatever um and then the flow maps because we also look at ODEs flow maps because we also look at ODEs flow maps because we also look at ODEs right especially if If you're doing flow right…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 51: 03 It's very sad. Anyway, um but how do you uh build a valid flow map? Actually the uh build a valid flow map? Actually the uh build a valid flow map? Actually the answer to this question uh can be found…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 51: 49 prediction of XS. Okay. So flow map is prediction of XS. Okay. So flow map is the predict prediction of XS the the predict prediction of XS the the predict prediction of XS the endpoint of the jump. O…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 52: 30 guess. Uh let's just like take this analogy. Okay. Yes. analogy. Okay. Yes. analogy. Okay. Yes. >> Call it progressive. Is that the same >> Call it progressive. Is that the same >> Call it progressive…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 53: 21 that is flowing down this one river. I that is flowing down this one river. I can teleport the duck so that the duck's can teleport the duck so that the duck's can teleport the duck so that the duck's…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 54: 00 get like basically okay. So I guess this is a better uh uh visualization. So this is a better uh uh visualization. So this is a better uh uh visualization. So this is generated by nano banana the thin…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 54: 39 check for you. And then and then the the cop be like, huh, let's see if there's cop be like, huh, let's see if there's cop be like, huh, let's see if there's any duck that is like suspicious. Like, an…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 55: 24 instantaneous jump so that you can fold the cop and then and then be like, "Oh, the cop and then and then be like, "Oh, the cop and then and then be like, "Oh, okay. This is a normal duck." Basically,…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 56: 25 >> Yes. >> So if you take a langian from S to S >> So if you take a langian from S to S >> So if you take a langian from S to S plus DT, it should be the same as the is plus DT, it should be the same …
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 57: 37 well for consistency model we don't really match the the the derivative. I really match the the the derivative. I really match the the the derivative. I guess that's the problem. guess that's the prob…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 58: 33 I can do I can be a little bit like I can essentially be a a little bit um can essentially be a a little bit um can essentially be a a little bit um like late. I can I I can start the jump like late. …
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 59: 57 jumping, they should end up at the same jumping, they should end up at the same place. So, as long as they're following place. So, as long as they're following place. So, as long as they're following …
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 60: 59 really mention the flow map thing in really mention the flow map thing in their in their paper. We by we I mean their in their paper. We by we I mean their in their paper. We by we I mean one of my pa…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 61: 43 displacement that you're predicting right so this is like so the right so this is like so the right so this is like so the displacement that you're predicting is displacement that you're predicting is…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 62: 36 they call a mean flow identity. they call a mean flow identity. Okay, that does it make sense for people? that does it make sense for people? Good. Okay. So why is mean flow a oiler Good. Okay. So why…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 63: 31 that's it. Um and one nice thing about the mean flow identity is that uh so in the mean flow identity is that uh so in the mean flow identity is that uh so in the middle here if you take s equals t th…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 64: 47 like but an interesting thing is that CTN was developed in 2023 CTN was developed in 2023 CTN was developed in 2023 and um the the how to train your like and um the the how to train your like and um t…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 65: 43 think this is the most intuitive one. So this is literally just saying that uh this is literally just saying that uh this is literally just saying that uh basically if your flow map jump from S basica…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 66: 44 How many any of you guys have seen this model? Shortcut model. No one. No. I model? Shortcut model. No one. No. I model? Shortcut model. No one. No. I think this is a Peter Ail or something. think thi…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 67: 33 making sure that your flow oh my god I'm so sorry we're running out of time but so sorry we're running out of time but so sorry we're running out of time but let's get let's finish everything uh the l…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 68: 31 likelihood. Uh so why why is that? Well, it's basically because yeah because it's it's basically because yeah because it's it's basically because yeah because it's only jump to in the sampling space a…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 69: 13 can use the same algorithms to solve another OD right so this is what we're another OD right so this is what we're another OD right so this is what we're doing so this is like my new paper doing so th…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 69: 53 use the same full map method to distill any OD. So if you have like you know an any OD. So if you have like you know an any OD. So if you have like you know an interesting OD that is associated with i…
cmu-10799-diffusion-flow L9: CMU 10799 S26: Lecture 10 - Distillation, Consistency Models & Flow Maps - Diffusion & Flow Matching 70: 40 He was a PhD student at Stanford. Uh he He was a PhD student at Stanford. Uh he co-founded something and then got co-founded something and then got co-founded something and then got acquired by Luma. …