概念

Reverse Diffusion Process

— 从纯噪声开始,沿马尔可夫链一步步把高斯期望"猜回去"。

反偏见开场:它不是"减噪声",它是一条被贝叶斯钉死的学习链

很多人第一次看 DDPM 的反向过程都会犯同一个错:把它想成"前向加噪、反向减噪",仿佛是一个可以代数地倒回去的算术运算。这种"加减对称"的图像很顺口,也容易让人在白板上画两个对称的箭头就以为讲清楚了,但错得彻底。反向过程不是把 $x_t$ 减掉一段噪声向量得到 $x_{t-1}$;它是从一个学习出来的高斯里采样——这个高斯的均值和方差,都是神经网络 $\theta$ 根据当前带噪样本 $x_t$ 和时间步 $t$ 算出来的:$p_\theta(x_{t-1}|x_t) = \mathcal{N}(x_{t-1};\,\mu_\theta(x_t,t),\,\Sigma_\theta(x_t,t))$。"学习"和"高斯"这两个词同样关键:学习意味着 $\mu_\theta$ 是一个需要训练的函数、不是闭式;高斯意味着即使你拿到了完美的 $\mu_\theta$,每一步反向也仍然是随机的,要从这个高斯里采一个新样本,而不是确定性地得到一个值。

Vizuara 的 Dr. Raj 在第三讲一开头就把这件事讲得很直白——他先花了三分钟复习 VAE,再过渡到 diffusion,反复强调"扩散模型的真正目的是找到底层概率分布"。他给的画面是:你想生成一只熊猫,熊猫的图像住在某片高维空间里的高概率区域;你从随机噪声出发——也就是站在概率地图上随便一个角落——沿着学到的链一步步"走回"那片高密度区。讲师强调,"走"是随机的,每一步你都站在当前位置 $x_t$,抬头看看周围概率密度往哪个方向涨得最快,然后跨一步,但具体跨到哪个点是带随机性的。

「The way diffusion models work is that they start out with noise. So they may start out at some random location in the probability distribution space.」—— Vizuara, Lecture 4 of Diffusion LM series @00:02

CMU 10-799 的讲师在第二讲也用类似口径切入:扩散就是"沿前向的反方向走",但他立刻补充——反方向不是确定的,它是一条概率链,每步都从条件高斯采样。这是 lecturer 反复强调的关键:"you cannot just invert the forward Markov chain — you have to learn the reverse one, because the reverse transition $q(x_{t-1}|x_t)$ alone is intractable."(无法直接反转前向链,必须学习反向链,因为不带条件的反向转移本身不可解析。)这一句话浓缩了反向过程的整个数学动机:前向 $q$ 是设计好的高斯,反向 $q(x_{t-1}|x_t)$ 在数学上存在却没有闭式表达——所以才需要一个神经网络去近似它的"可解析变种" $q(x_{t-1}|x_t,x_0)$。

讲师比喻汇总(保留双课程视角,不合并、不平均化):

  • Vizuara · Dr. Raj:把反向过程比作"在概率地图上从随机点走回熊猫所在的高密度区"——空间导航式直觉;强调"起点是随机的、目的地是高密度区、路径是逐步收敛的"。他在 Diffusion LM L4 里画了一个二维概率密度图,把熊猫和卡车分别放在两个高斯峰里,让你看到反向过程怎么"流"向其中一个峰。
  • CMU 10-799:强调反向链是"forward chain 的学习版镜像",每一步都对应一个 tractable 后验,但需要网络拟合——更偏推导式直觉,少比喻、多公式。讲师在板书上把前向链和反向链画成上下两条平行的箭头流,上面标 $q$、下面标 $p_\theta$,并强调"$q$ 已知不需要学,$p_\theta$ 要学"。
🟡 教材外补充:这两种直觉不矛盾——Vizuara 偏几何(你在概率地图上走),CMU 偏代数(你在拟合一条 Markov 链)。一个高质量的心智模型应当同时持有两者:每一次采样都是"在概率地图上沿着学到的方向跨一步带噪声的随机步"。读 Karras 2022 的 EDM 论文时,你会发现这两种直觉分别对应"score field 几何视角"和"SDE 解算器视角"。

在训练里,这件事对应:网络只需在每个时间步 $t$ 学一件事——给定带噪样本 $x_t$,预测条件高斯的均值(或等价地预测噪声 $\epsilon$、或预测原图 $x_0$,三者代数互换)。生成时把这件事重复 $T$ 次($T$ 通常是 1000,DDIM 可以压到 50 甚至 10)。整个 DDPM 的"复杂数学"——VLB 推导、ELBO 化简、loss 简化——最终都是为了把这一句话坐实:让神经网络每一步只猜一个高斯均值。这种"把一个困难的密度估计问题切成 $T$ 个简单回归问题"的拆解,是反向过程在工程上能跑通的核心原因——也解释了为什么 diffusion 在大模型时代比 GAN/VAE 更鲁棒:每一步监督信号都明确、训练目标稳定,没有 mode collapse、没有 posterior collapse。

从前向定义出发:为什么反向也是高斯

前向过程是给定的、不学的——它由人工设计的 $\beta$ 调度完全决定,每一步都加一点高斯噪声:$q(x_t|x_{t-1}) = \mathcal{N}(x_t;\sqrt{1-\beta_t}x_{t-1},\beta_t I)$。这条链有一个常被忽略却极重要的"奇迹":当 $\beta_t$ 足够小时,反向条件 $q(x_{t-1}|x_t)$ 也近似是高斯。这是 Sohl-Dickstein 2015 那篇原始论文("Deep Unsupervised Learning using Nonequilibrium Thermodynamics")的核心数学事实,DDPM 完全建立在这个事实之上。如果这个性质不成立,反向网络就必须输出比高斯更复杂的分布族(例如混合高斯、normalizing flow),整个 DDPM 框架会复杂数倍。

Why 它是高斯:单步加噪是线性高斯变换,逆过程在小步长极限下保持高斯族;如果你一步从 $x_0$ 直接跳到 $x_T$(即 $\beta$ 取得很大、只用一两步),逆过程就不再是高斯——会变成多峰、长尾的复杂分布。所以反向用高斯参数化的前提是前向 $\beta_t$ 的"小步长"假设。这也是为什么 DDPM 通常用 $T=1000$ 步:步数越多,每步 $\beta$ 越小,反向高斯近似越精确。DDIM 之所以能压到 50 步而不掉质量,是因为它换了非马尔可夫的视角、不再依赖这个小步长假设。

关键武器:以 $x_0$ 为条件的可解析后验

无条件的 $q(x_{t-1}|x_t)$ 在数学上完全确定,但不可解析——它要求对所有可能的 $x_0$ 做边缘化积分 $\int q(x_{t-1}|x_t,x_0)q(x_0|x_t)dx_0$,而 $q(x_0|x_t)$ 涉及整个数据分布,没有闭式。这是反向过程"必须学习"的根本原因。但只要你额外条件在 $x_0$ 上,后验就有干净的闭式:

$$q(x_{t-1}|x_t,x_0) = \mathcal{N}\big(x_{t-1};\,\tilde\mu_t(x_t,x_0),\,\tilde\beta_t I\big)$$

其中:

$$\tilde\mu_t(x_t,x_0) = \frac{\sqrt{\bar\alpha_{t-1}}\beta_t}{1-\bar\alpha_t}x_0 + \frac{\sqrt{\alpha_t}(1-\bar\alpha_{t-1})}{1-\bar\alpha_t}x_t,\qquad \tilde\beta_t = \frac{1-\bar\alpha_{t-1}}{1-\bar\alpha_t}\beta_t$$

这里 $\alpha_t = 1-\beta_t$、$\bar\alpha_t = \prod_{s\le t}\alpha_s$ 是常见的缩写记号,几乎所有 diffusion 论文都沿用。这是反向过程的"地面真值":训练目标就是让网络输出的 $\mu_\theta(x_t,t)$ 接近 $\tilde\mu_t(x_t,x_0)$;而 VLB 推导出来的 KL 项 $\mathrm{KL}(q(x_{t-1}|x_t,x_0)\|p_\theta(x_{t-1}|x_t))$ 在两个高斯之间就退化为简单的均值差平方——这就是 DDPM 的"simple loss" 最终长得像 $\|\hat\epsilon - \epsilon\|^2$ 的源头。

Why 要引入 $x_0$ 这个"作弊条件":训练时我们手里有真实 $x_0$(数据集里直接取),所以可以用 Bayes 把 $q(x_{t-1}|x_t,x_0)$ 推成可解析的高斯;推断时没有 $x_0$,于是用 $x_0 \approx x_{0,\theta}(x_t)$ 替换,等价于让网络隐式预测 $x_0$。这个"训练时有 $x_0$、推断时网络猜 $x_0$"的不对称,是 diffusion 区别于 flow matching 的关键设计——FM 在两端都不需要这种作弊。

🔑 Bayes 推导骨架:$q(x_{t-1}|x_t,x_0) \propto q(x_t|x_{t-1})\,q(x_{t-1}|x_0)$(注意分母 $q(x_t|x_0)$ 与 $x_{t-1}$ 无关,被吸进比例常数)。右边两项都是已知高斯:$q(x_t|x_{t-1}) = \mathcal{N}(\sqrt{\alpha_t}x_{t-1},\beta_t I)$,$q(x_{t-1}|x_0) = \mathcal{N}(\sqrt{\bar\alpha_{t-1}}x_0,(1-\bar\alpha_{t-1})I)$。乘起来后把指数项展开、对 $x_{t-1}$ 配方(complete the square),就得到上面的 $\tilde\mu_t,\tilde\beta_t$。两个高斯之积仍是高斯——这是为什么反向链"恰好"也是高斯,纯粹由前向的线性高斯结构推出来,不是巧合。整套推导大约 5 行代数,建议读者亲手做一次。

三种等价参数化:$\mu_\theta \leftrightarrow \epsilon_\theta \leftrightarrow x_{0,\theta}$

DDPM (Ho 2020) 的关键观察:直接让网络输出 $\mu_\theta$ 训练不稳——因为 $\mu_\theta$ 的尺度依赖于 $t$、$\bar\alpha_t$,不同时间步的预测目标尺度差异巨大。但因为前向有闭式 $x_t = \sqrt{\bar\alpha_t}x_0 + \sqrt{1-\bar\alpha_t}\epsilon$,可以把 $\mu_\theta$ 重写成只依赖噪声预测 $\epsilon_\theta(x_t,t)$ 的形式:

$$\mu_\theta(x_t,t) = \frac{1}{\sqrt{\alpha_t}}\Big(x_t - \frac{\beta_t}{\sqrt{1-\bar\alpha_t}}\epsilon_\theta(x_t,t)\Big)$$

同样可以让网络直接预测 $x_{0,\theta}$,三者之间的转换关系:

参数化网络输出从 $x_t$ 反推实践偏好
$\mu$-pred$\mu_\theta(x_t,t)$直接得到 $x_{t-1}$ 的均值原始 VLB,少用
$\epsilon$-pred$\epsilon_\theta(x_t,t)$$x_{0,\theta} = (x_t - \sqrt{1-\bar\alpha_t}\epsilon_\theta)/\sqrt{\bar\alpha_t}$DDPM 默认
$x_0$-pred$x_{0,\theta}(x_t,t)$$\epsilon_\theta = (x_t - \sqrt{\bar\alpha_t}x_{0,\theta})/\sqrt{1-\bar\alpha_t}$低 SNR 时更稳

Why 等价:因为前向公式 $x_t = \sqrt{\bar\alpha_t}x_0 + \sqrt{1-\bar\alpha_t}\epsilon$ 是确定性可逆的——只要知道任一者,就可以代数地推出另两者。三种 loss 在期望意义下等价,但梯度尺度不同,所以训练表现差异很大(见 v-prediction、SNR-weighted loss 的讨论)。

🟡 教材外补充:Salimans & Ho 2022 又提出第四种 $v$-prediction:$v = \sqrt{\bar\alpha_t}\epsilon - \sqrt{1-\bar\alpha_t}x_0$。它在 $t \to 0$ 时退化为 $\epsilon$、$t \to T$ 时退化为 $-x_0$,把整条链的信噪比"均化"。Stable Diffusion 3、PixArt-α 都用它。

方差:固定 vs 学习

DDPM 把 $\Sigma_\theta$ 直接固定为 $\sigma_t^2 I$,两种常见选择:$\sigma_t^2 = \beta_t$(对应 $x_0 \sim \mathcal{N}(0,I)$ 的上界)或 $\sigma_t^2 = \tilde\beta_t$(对应 $x_0$ 是确定值的下界)。Ho 在论文里实验过两者,差别很小——这是个相当"宽容"的设计选择。Improved DDPM (Nichol & Dhariwal 2021) 把方差也学出来:让网络多输出一个插值系数 $v \in [0,1]$,构造 $\Sigma_\theta = \exp(v\log\beta_t + (1-v)\log\tilde\beta_t)$——log 空间插值是为了数值稳定。这能让 NLL 显著下降(约 0.1–0.2 bits/dim),但样本视觉质量提升很小,所以工程上很多 codebase 仍保留固定方差的简洁性。

🟡 教材外补充:Karras 2022 (EDM) 完全抛弃了"学方差"这条线,转而提出统一的 $\sigma$ 参数化——把扩散过程改写成连续 SDE,用 $\sigma$(噪声水平)而非离散 $t$ 作为时间轴,反向方差直接由解算器(Euler、Heun)的局部步长决定。这是当前 SOTA 图像生成(如 Imagen 2、SD3)的事实标准。

网络架构:U-Net + 正弦时间嵌入

反向网络几乎都用 U-Net:encoder 下采样、bottleneck、decoder 上采样 + skip connection。这种"沙漏"结构特别适合 dense prediction 任务——而反向过程的每一步本质上就是个 dense prediction(输入一张图、输出同尺寸的噪声预测或均值预测)。关键不同点(这是 diffusion U-Net 区别于分割 U-Net 的地方):每个 ResBlock 里都注入时间嵌入 $\tau(t)$。$\tau$ 用正弦位置编码(和 Transformer 一样)再过两层 MLP,得到一个 $d$ 维向量,然后通过 AdaGN 或简单的 channel-wise 加法注入每一层:

$$\tau(t) = \mathrm{MLP}\big([\sin(\omega_1 t),\cos(\omega_1 t),\ldots,\sin(\omega_d t),\cos(\omega_d t)]\big),\quad \omega_k = 10000^{-2k/d}$$

Why 时间嵌入必要:同一个 U-Net 要在 $T=1000$ 个不同噪声尺度上都能"猜对"——$t=1$ 时输入几乎是干净图、$t=T$ 时输入几乎是纯噪声,两个任务在统计上差异巨大。没有 $\tau(t)$ 网络就不知道当前噪声多重,等于让同一个去噪器闭眼处理 1000 种不同噪声强度的输入却必须共享所有权重。文献里有人尝试每个 $t$ 训一个独立网络(multi-network DDPM),代价是参数量乘 1000 倍且每个网络数据稀疏,效果远不如 single-net + time embedding 这种"用条件输入软共享权重"的方案。

采样算法:迭代 T 步反向链

训练完成后,生成图像的算法非常简洁——这是 Ho 2020 Algorithm 2 的全部内容:

  1. 初始化:$x_T \sim \mathcal{N}(0, I)$,从标准高斯采一张"纯噪声图"作为起点。
  2. 循环 $t = T, T-1, \ldots, 1$:
    • 用网络算 $\hat\epsilon = \epsilon_\theta(x_t, t)$;
    • 由此构造 $\mu_\theta(x_t, t) = \frac{1}{\sqrt{\alpha_t}}(x_t - \frac{\beta_t}{\sqrt{1-\bar\alpha_t}}\hat\epsilon)$;
    • 若 $t > 1$,采 $z \sim \mathcal{N}(0, I)$,否则 $z = 0$;
    • $x_{t-1} = \mu_\theta(x_t, t) + \sigma_t z$。
  3. 返回 $x_0$ —— 这就是生成的图像。

整个过程无任何梯度计算,只是 $T$ 次前向 inference。对 $T=1000$、512×512 的图像,单卡 A100 大约要 30 秒——这就是 diffusion 慢的根本原因,也是 DDIM、Consistency Models、distillation 这一系列后续工作的动机。值得强调:训练和推断这两端的计算结构完全不同——训练时随机选 $t$、单步 forward + backward、不需要采样链;推断时则要把所有 $t$ 串成一条采样链、纯 forward、无 backward。这种"训练单步、推断多步"的不对称,是 diffusion 区别于 GAN/VAE 的最大工程特征,也直接决定了它的部署成本曲线。

前向 q(已知、加噪) ··· x₀ 真实图像 x₁ x₂ ··· x_{T-1} x_T N(0, I) ··· 反向 p_θ(学习、去噪):x_T → x_0

下方按钮把反向链的单步采样展开成等式链。不变量:无论用哪种参数化,最终都给出同一个 $\mu_\theta$;噪声项 $\sigma_t z$ 在 $t>1$ 时保留、$t=1$ 时设 0。

输入:$(x_t, t)$,U-Net 输出 $\hat\epsilon = \epsilon_\theta(x_t, t)$。这是唯一需要学习的量。
$x_{0,\theta} = \dfrac{x_t - \sqrt{1-\bar\alpha_t}\,\hat\epsilon}{\sqrt{\bar\alpha_t}}$ —— 用前向公式反推"网络认为的原图"。
$\mu_\theta = \dfrac{\sqrt{\bar\alpha_{t-1}}\beta_t}{1-\bar\alpha_t}x_{0,\theta} + \dfrac{\sqrt{\alpha_t}(1-\bar\alpha_{t-1})}{1-\bar\alpha_t}x_t$ —— 代入贝叶斯后验均值公式。
$x_{t-1} = \mu_\theta + \sigma_t z,\ z\sim\mathcal{N}(0,I)$。$t=1$ 时 $z = 0$,否则会污染最终图。

手算一步反向采样($T=4$ 玩具例子)

为了让读者真正能拿笔跟着算,下面用一个极简的 $T=4$ 玩具例子走一步完整的反向采样。用线性 $\beta$ 调度:$\beta_1=0.1, \beta_2=0.2, \beta_3=0.3, \beta_4=0.4$。则 $\alpha = (0.9, 0.8, 0.7, 0.6)$,$\bar\alpha = (0.9,\,0.9\cdot 0.8,\,0.9\cdot 0.8\cdot 0.7,\,\ldots) = (0.9, 0.72, 0.504, 0.3024)$。现在我们从 $t=2$ 反向走一步到 $t=1$。设当前 $x_2 = 1.0$(一维标量代替图像,便于手算),网络预测 $\hat\epsilon = 0.5$。

第 1 步(从 $\hat\epsilon$ 推 $x_{0,\theta}$):$x_{0,\theta} = (x_t - \sqrt{1-\bar\alpha_t}\,\hat\epsilon)/\sqrt{\bar\alpha_t} = (1.0 - \sqrt{1-0.72}\cdot 0.5)/\sqrt{0.72} = (1.0 - \sqrt{0.28}\cdot 0.5)/0.8485 = (1.0 - 0.5292\cdot 0.5)/0.8485 = (1.0 - 0.2646)/0.8485 = 0.866$。

第 2 步(代入贝叶斯后验均值):$\mu_\theta = \dfrac{\sqrt{\bar\alpha_{t-1}}\beta_t}{1-\bar\alpha_t}x_{0,\theta} + \dfrac{\sqrt{\alpha_t}(1-\bar\alpha_{t-1})}{1-\bar\alpha_t}x_t = \dfrac{\sqrt{0.9}\cdot 0.2}{1-0.72}\cdot 0.866 + \dfrac{\sqrt{0.8}\cdot(1-0.9)}{1-0.72}\cdot 1.0$

$= \dfrac{0.9487\cdot 0.2}{0.28}\cdot 0.866 + \dfrac{0.8944\cdot 0.1}{0.28}\cdot 1.0 = 0.6776\cdot 0.866 + 0.3194\cdot 1.0 = 0.5868 + 0.3194 = 0.9062$。

第 3 步(采样得到 $x_1$):$\tilde\beta_2 = \dfrac{1-\bar\alpha_{t-1}}{1-\bar\alpha_t}\beta_t = \dfrac{1-0.9}{1-0.72}\cdot 0.2 = \dfrac{0.1}{0.28}\cdot 0.2 = 0.0714$,$\sigma_2 = \sqrt{0.0714} = 0.267$。取一个随机抽样 $z = 0.3$(标准正态采样),则 $x_1 = \mu_\theta + \sigma_2 z = 0.9062 + 0.267\cdot 0.3 = 0.986$。

注意几个有教学意义的细节:(1)$x_1$ 比 $x_2$ 略低,因为 $\mu_\theta$ 把 $x_t$ 往"网络猜的 $x_0$"方向轻微拉;(2)方差 $\tilde\beta_2 = 0.0714$ 比前向 $\beta_2 = 0.2$ 小很多——反向后验比前向边缘窄,这就是"链越靠近 $x_0$,越确定"的体现;(3)下一步如果继续走到 $t=0$(即从 $t=1$ 走到 $x_0$),按 DDPM 规定 $z = 0$,不再加噪声项,所以 $x_0 = \mu_\theta(x_1, 1)$ 是确定的。整个 $T=4$ 反向链走完,你就得到一张"生成的"标量"图"。

常见误区

  1. "反向过程就是把前向加的噪声减回去"。反例:前向公式是 $x_t = \sqrt{\alpha_t}x_{t-1} + \sqrt{\beta_t}\epsilon$,"减回去"听上去意味着 $x_{t-1} = (x_t - \sqrt{\beta_t}\epsilon)/\sqrt{\alpha_t}$——但你不知道前向当时采的那个具体 $\epsilon$;训练时被采的噪声样本早就在 forward pass 里"用完"了,推断时拿到的只是 $x_t$。所以你只能从学到的高斯 $p_\theta$ 里采样。具体地,DDPM 的 $\mu_\theta$ 还乘了 $\beta_t/(1-\bar\alpha_t)$ 这个修正因子,不是简单代数地"除回去",对应 $t=2$ 玩具例子里的 0.6776 系数。
  2. "最后一步也要加噪声 $\sigma_t z$"。反例:取 $t=1, \sigma_1 \approx 0.316$(用 $\beta_1=0.1$ 的玩具值),如果末步不把 $z$ 强制设为 0,最终输出 $x_0$ 会有显著高斯抖动——在 CIFAR-10 上做实验,FID 会差 2-3 个点;视觉上能看到背景区域出现"沙粒"。Ho 2020 Algorithm 2 第 4 行明确写 z = 0 if t == 1,这是常被新手实现 DDPM 时忘掉的一行。
  3. "$\epsilon$-prediction 和 $x_0$-prediction 在所有 $t$ 都同样好"。反例:$t \to T$($\bar\alpha_t \to 0$)时,$x_t$ 几乎是纯高斯噪声,$\epsilon$-pred 的目标几乎就是输入本身(trivial 任务),但 $x_0$-pred 要从近乎随机的输入里猜出干净的真图——loss 方差极大、训练困难。$t \to 0$ 时则完全相反:$\epsilon$-pred 要从近乎干净的图里抽出微小噪声、信噪比反而难,$x_0$-pred 退化为近乎恒等映射、几乎免费学。这就是 Salimans & Ho 的 $v$-prediction 被发明的根本原因——把 SNR 在整条链上"均化"。

相关概念

来源

  1. diffusion-principles-vizuara · L3 · Introduction to Diffusion Models (DDPM) · (0:05)
  2. cmu-10799-diffusion-flow · L2 · Denoising Diffusion Models · (0:03)
  3. diffusion-lm-vizuara · L4 · How Diffusion Models Work for Image Generation · (0:02)
查看 193 条课程原文出处
CourseLectureTimeExcerpt
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 00: 03 Cool. Hello everyone. Oh, it's not Cool. Hello everyone. Oh, it's not significantly fewer. I guess it's significantly fewer. I guess it's significantly fewer. I guess it's slightly significant. Okay, …
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 00: 49 actually takes time. So I I I I mean it it takes at least a couple of hours uh it takes at least a couple of hours uh it takes at least a couple of hours uh on GPU. on GPU. on GPU. Do not even try to …
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 01: 21 sponsor is going to give us a guest lecture tomorrow. So, if you are going lecture tomorrow. So, if you are going lecture tomorrow. So, if you are going to be using the sponsor credit, I think to be u…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 01: 58 with cloud and it's it's going to work I'm sure. Um and I already tested so so I'm sure. Um and I already tested so so I'm sure. Um and I already tested so so it should work. And uh the Oh yes, and it…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 02: 41 for the mini class than the semester for the mini class than the semester class. So I think you guys are going to class. So I think you guys are going to class. So I think you guys are going to be mor…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 03: 23 anything. Okay, you don't you do not need to submit any forms. Like it's just need to submit any forms. Like it's just need to submit any forms. Like it's just like basically the the the the thing is …
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 04: 04 obviously I cannot grade you. Uh but if you want to say like sit in a class you want to say like sit in a class you want to say like sit in a class which are you already did um and or uh which are you…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 04: 38 first quiz next next class is just going to be the things that we have learned to be the things that we have learned to be the things that we have learned throughout this week. There will be no throug…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 05: 17 distribution of the data so that we can actually draw new samples from it. Yeah. actually draw new samples from it. Yeah. actually draw new samples from it. Yeah. And we have looked at a couple of And…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 06: 06 you try you try to learn an encoder so that it can encode it into some latent that it can encode it into some latent that it can encode it into some latent space. Uh and then like it is an space. Uh a…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 06: 47 trying to make sure that this encoding trying to make sure that this encoding this notion of of encoding is the same this notion of of encoding is the same this notion of of encoding is the same for b…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 07: 33 data. Okay. So this is what we can data. Okay. So this is what we can design but what we do not have is uh design but what we do not have is uh design but what we do not have is uh basically the the a…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 08: 21 try to make sure that um the encoder and try to make sure that um the encoder and decoder are induced by the same um like decoder are induced by the same um like decoder are induced by the same um lik…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 09: 09 You multiply by something and divide it by something and then you get a equal by something and then you get a equal by something and then you get a equal sign, right? Uh and basically this thing sign,…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 10: 00 if your function is con concave then the the sign flips. So here the log function the sign flips. So here the log function the sign flips. So here the log function is a concave function. So that's why…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 10: 56 remember like this thing like we do not have a sampler of x, right? So we just have a sampler of x, right? So we just have a sampler of x, right? So we just we need a sampler over z that is like we ne…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 11: 36 anyone take a guess of like what what kind of parameterization that we're kind of parameterization that we're kind of parameterization that we're going to use here? going to use here? going to use her…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 12: 28 parameterize Q Z uh Z over uh Z given parameterize Q Z uh Z over uh Z given accent also a gausian also gausian right uh so also a gausian also gausian right uh so basically it just just you just choos…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 13: 15 of it to be a diagonal gausian then we can literally just write out the par the can literally just write out the par the can literally just write out the par the parameters of the distribution like th…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 14: 05 okay. Okay. So because we have this and both of them are Gaussian. Uh so that both of them are Gaussian. Uh so that both of them are Gaussian. Uh so that this KL actually has a closed form. So this KL…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 14: 48 decoder? Anyone want to take a guess? Maybe a gian mixture more because like Maybe a gian mixture more because like gosh is more. >> Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. >> Yeah. Yeah. Yeah. Yeah. Yeah…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 15: 58 and then uh it's uh magically it's uh magically it's uh magically something that that is basically L2. So something that that is basically L2. So something that that is basically L2. So that's why it'…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 17: 04 genes is like expressive. So basically they have some like lazy genes. This is they have some like lazy genes. This is they have some like lazy genes. This is kind of like that. So you you are kind of…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 17: 53 him? Yeah. him? Yeah. >> Oh, okay. Okay. That's okay. Go ahead. >> Oh, okay. Okay. That's okay. Go ahead. >> Oh, okay. Okay. That's okay. Go ahead. >> Is there variance of the uh the Q >> Is there var…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 18: 44 >> Two he explained to me. One is that u if it is not a dis a distribution progress it is not a dis a distribution progress it is not a dis a distribution progress take modeling it is a one to one map…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 19: 38 Also, by the way, they're like this is like VAE is not the only way to do like VAE is not the only way to do like VAE is not the only way to do latent variable like and and actually latent variable li…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 20: 28 calculate uh the elbow loss and then you calculate uh the elbow loss and then you uh optimize it. This is how you train a uh optimize it. This is how you train a uh optimize it. This is how you train …
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 21: 15 talk about but like they they're also talk about but like they they're also likelihood based and we can also do a likelihood based and we can also do a likelihood based and we can also do a likelihood…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 22: 07 into a more complicated one. So this is into a more complicated one. So this is like sort of like the general underlying like sort of like the general underlying like sort of like the general underlyi…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 23: 23 from the from from the audience. H this column. Hello, guys. H Which one H this column. Hello, guys. H Which one H this column. Hello, guys. H Which one do you prefer? I'll let you guys pick. do you p…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 24: 14 >> Okay. So, like, uh, yeah. So, for Gans, it's very difficult to train, right? it's very difficult to train, right? it's very difficult to train, right? Basically, that's what you said. Basically, th…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 25: 10 saying right like they cannot >> you like basically is kind of a >> you like basically is kind of a >> you like basically is kind of a continuous continuous continuous >> um so for g for for GANs espe…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 25: 57 >> Uh VAES are going to kind of take the >> Uh VAES are going to kind of take the average of a distribution because average of a distribution because average of a distribution because they're enforcin…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 27: 01 be able to calculate stuff one by one be able to calculate stuff one by one and for text that's okay because text is and for text that's okay because text is and for text that's okay because text is s…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 27: 35 break things up that everything is going break things up that everything is going to be really really slow, right? So say to be really really slow, right? So say to be really really slow, right? So sa…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 28: 17 from Reddit seven years ago are like why are VA so blurry? Yeah, that's because are VA so blurry? Yeah, that's because are VA so blurry? Yeah, that's because uh you know uh vaes are exactly right uh y…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 29: 05 average uh data all the time and GANs are extremely extremely difficult to are extremely extremely difficult to are extremely extremely difficult to train. Uh, so even though it works train. Uh, so ev…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 29: 48 something called mode collapse which something called mode collapse which just means that like basically it's sort just means that like basically it's sort just means that like basically it's sort of …
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 30: 33 you sample a noise from a noise distribution like Gausian and then you distribution like Gausian and then you distribution like Gausian and then you apply some sort of like magical training apply some…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 31: 14 Do you think that's easier? Yes, it is Do you think that's easier? Yes, it is easier. This is a healthier type of easier. This is a healthier type of easier. This is a healthier type of magic. It's no…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 32: 01 that we take from a complete noise and that we take from a complete noise and then we gradually try to dn noiseise it then we gradually try to dn noiseise it then we gradually try to dn noiseise it so…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 32: 39 is this is all makes sense. All gonna make sense. We we just just just channel make sense. We we just just just channel make sense. We we just just just channel your inner gausian and everything's you…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 33: 23 We're going to talk about it or or like does it actually need to be scaled? does it actually need to be scaled? does it actually need to be scaled? We're going to talk about it next class. We're going…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 34: 10 distribution by their mean and their variance right this is basic or or yeah variance right this is basic or or yeah variance right this is basic or or yeah so this is what's happening so this is what…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 35: 04 >> great question in general? How big is t? >> great question in general? How big is t? The this later on the the model that The this later on the the model that The this later on the the model that w…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 35: 50 I shall hope so because this is literally the first step that how we literally the first step that how we literally the first step that how we develop the elbow from VAE as well, develop the elbow fro…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 36: 44 joint from time zero to time t. So we're just going to break things up into just going to break things up into just going to break things up into things that we know. So first of all, we things that w…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 37: 30 you can turn the join distribution into a chain of the the into a chain of like a chain of the the into a chain of like a chain of the the into a chain of like the your current given the previous the …
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 38: 24 basically we can get yeah anyway we can turn we can turn this yeah anyway we can turn we can turn this yeah anyway we can turn we can turn this Q here into a combination of the three Q here into a com…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 39: 22 something is equal to the sum of log of this thing minus this thing plus this this thing minus this thing plus this this thing minus this thing plus this thing minus the next thing and then it's thing…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 40: 19 Yeah. A plus a plus a reconstruction Yeah. A plus a plus a reconstruction laws. laws. laws. Do we do we find this familiar? No way we don't find this familiar. Do No way we don't find this familiar. D…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 41: 22 doesn't work that well. Uh so is is there any way that we can make this work there any way that we can make this work there any way that we can make this work because that whole thing is just too beca…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 42: 14 thing is Markoff, right? Which means that at each step, it just adds a very that at each step, it just adds a very that at each step, it just adds a very small amount of noise to the previous small am…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 43: 05 you absolutely could now you have ddpm you absolutely could now you have ddpm so if you if if there's another slide so if you if if there's another slide so if you if if there's another slide that you…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 43: 50 it so we just fix it right we just have it so we just fix it right we just have a fixed noising schedule that each time a fixed noising schedule that each time a fixed noising schedule that each time …
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 44: 38 right? So one gausian plus another gausian plus t gausian is still a gausian plus t gausian is still a gausian plus t gausian is still a gausian. So instead of like at in the gausian. So instead of li…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 45: 24 both Q and P to be the same gausian. So both Q and P to be the same gausian. So it's it's going to be perfect every it's it's going to be perfect every it's it's going to be perfect every time. Doesn'…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 46: 16 know in closed form the mean and the variance of this particular uh uh variance of this particular uh uh variance of this particular uh uh distribution that we're going to use. distribution that we're…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 47: 00 this this variance based on the variance that you choose for the forward process. that you choose for the forward process. that you choose for the forward process. But basically what we can do is we c…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 47: 53 this mean versus the mean that you this mean versus the mean that you predict Any predict Any predict Any question? Nope. Alrighty. Nope. Alrighty. All right. Now we have everything. All right. Now we…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 48: 48 weight you should give to each based on your your your time step. So this is the your your your time step. So this is the your your your time step. So this is the reparameter same reparameterization r…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 49: 48 Why is this a good thing you may ask? Why is this a good thing you may ask? This is so complicated. Why do we want This is so complicated. Why do we want This is so complicated. Why do we want this? I…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 50: 54 uh of your that that can represent your prediction. And then here is why you can prediction. And then here is why you can prediction. And then here is why you can directly predict the noise. All right…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 51: 50 literally they simplify into a L2 loss between the the noise that you're adding between the the noise that you're adding between the the noise that you're adding to your sample and the predicted noise…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 52: 44 because the the the noise you predicted because the the the noise you predicted is literally how much noise should I d is literally how much noise should I d is literally how much noise should I d noi…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 53: 27 the the the the expression for the predicted mean of that is given by XT. predicted mean of that is given by XT. predicted mean of that is given by XT. So your previous time your your current So your …
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 54: 20 step. You're not trying to jump from to x0 yet. Uh in order to jump to x0 x0 yet. Uh in order to jump to x0 x0 yet. Uh in order to jump to x0 there's actually a paper about it. And there's actually a …
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 55: 00 plus a gausian noise. So this is still this this distribution. Okay, this this distribution. Okay, this this distribution. Okay, any other questions? Cool. Erh anyhow anyhow so that's it for Cool. Erh…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 55: 53 then you try to like basically see if the noise that you predict is accurate the noise that you predict is accurate the noise that you predict is accurate uh in comparison to the the ground truth uh i…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 56: 31 And then like 10,000 steps later, you And then like 10,000 steps later, you get a sample. Make sense? Make sense? Cool. Amazing. And and the model is Cool. Amazing. And and the model is Cool. Amazing.…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 57: 25 latent let's just say and then later we're trying to map this latent this we're trying to map this latent this we're trying to map this latent this gausian uh into the a reconstruction of gausian uh i…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 58: 18 X >> no >> no >> no >> well well basically it doesn't depend on X in well basically it doesn't depend on X in the sense that it's not like the sense that it's not like the sense that it's not like it …
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 59: 15 >> This will be closer to this one like you >> This will be closer to this one like you can do interpolation which has an can do interpolation which has an can do interpolation which has an effect. ef…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 60: 02 should be an autoenccoder which means should be an autoenccoder which means that uh it it should have some that uh it it should have some that uh it it should have some compression actually. So basica…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 60: 44 this is not very clear anymore and it's because um it's like the the noise and because um it's like the the noise and because um it's like the the noise and the data are of the same dimension. So the …
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 61: 29 called a unit. Okay. Uh so exactly what it is is basically you have some input it is is basically you have some input it is is basically you have some input like input image right and then you are lik…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 62: 16 basically you are downsampling and upsampling your uh your image so that upsampling your uh your image so that upsampling your uh your image so that like basically you sort of covers both like basical…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 63: 10 where input and outputs are about the where input and outputs are about the same dimensionality same dimensionality same dimensionality um spatially. Uh but basically later on um spatially. Uh but bas…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 63: 57 because uh we because we have this like rep like uh we because we have this like rep like uh we because we have this like rep like this way to represent uh the the noisy this way to represent uh the t…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 64: 43 literally just plug in this thing into your mean and then you you should be your mean and then you you should be your mean and then you you should be able to get a nicely formulated closed able to get…
cmu-10799-diffusion-flow L3: CMU 10799 S26: Lecture 2 - Denoising Diffusion Models - Diffusion & Flow Matching 65: 25 we should now know what diffusion model is. And in this class, we basically just is. And in this class, we basically just is. And in this class, we basically just derive the diffusion model from from …
diffusion-lm-vizuara L5: Lecture 4: How Diffusion Models Work for Image Generation 00: 02 Now that we have seen the probabilistic Now that we have seen the probabilistic length of generative AI, let us actually length of generative AI, let us actually length of generative AI, let us actual…
diffusion-lm-vizuara L5: Lecture 4: How Diffusion Models Work for Image Generation 00: 50 distribution space. Let's say this is distribution space. Let's say this is noise and noise can live anywhere, noise and noise can live anywhere, noise and noise can live anywhere, right? So we start …
diffusion-lm-vizuara L5: Lecture 4: How Diffusion Models Work for Image Generation 01: 39 and what good will this do to me if I and what good will this do to me if I start from noise. Well, look at this start from noise. Well, look at this start from noise. Well, look at this video, right?…
diffusion-lm-vizuara L5: Lecture 4: How Diffusion Models Work for Image Generation 02: 29 this and we sequentially go on adding this and we sequentially go on adding noise. We sequentially go on adding noise. We sequentially go on adding noise. We sequentially go on adding noise until it b…
diffusion-lm-vizuara L5: Lecture 4: How Diffusion Models Work for Image Generation 03: 36 I will train a machine learning model to predict how much noise was added to predict how much noise was added to predict how much noise was added to predict how much noise was added. Why to predict ho…
diffusion-lm-vizuara L5: Lecture 4: How Diffusion Models Work for Image Generation 04: 23 step we have a model which predicts how much noise has been added to each step. much noise has been added to each step. much noise has been added to each step. So we have to train an ML model which So…
diffusion-lm-vizuara L5: Lecture 4: How Diffusion Models Work for Image Generation 05: 13 So let's say if you have if you want to So let's say if you have if you want to predict images which look like this predict images which look like this predict images which look like this panda bear p…
diffusion-lm-vizuara L5: Lecture 4: How Diffusion Models Work for Image Generation 06: 01 slowly. If you do this experiment at slowly. If you do this experiment at home and if you stir this fluid very home and if you stir this fluid very home and if you stir this fluid very fast and if you…
diffusion-lm-vizuara L5: Lecture 4: How Diffusion Models Work for Image Generation 07: 17 diffusion dnoising and noising is also diffusion dnoising and noising is also called as forward diffusion. So this called as forward diffusion. So this called as forward diffusion. So this same intuit…
diffusion-lm-vizuara L5: Lecture 4: How Diffusion Models Work for Image Generation 07: 59 So again to summarize the way diffusion So again to summarize the way diffusion for images works is that we take a for images works is that we take a for images works is that we take a random image fr…
diffusion-lm-vizuara L5: Lecture 4: How Diffusion Models Work for Image Generation 08: 53 how to reduce the noise. how to reduce the noise. By doing this repeatedly the model can By doing this repeatedly the model can By doing this repeatedly the model can transform any noise to a sample t…
diffusion-lm-vizuara L5: Lecture 4: How Diffusion Models Work for Image Generation 09: 45 That's the beauty of diffusion process. So there are certain key characteristics So there are certain key characteristics So there are certain key characteristics of diffusion. So there are key charac…
diffusion-lm-vizuara L5: Lecture 4: How Diffusion Models Work for Image Generation 10: 41 here we use a machine learning model to here we use a machine learning model to predict this noise. Um and to make it predict this noise. Um and to make it predict this noise. Um and to make it more s…
diffusion-lm-vizuara L5: Lecture 4: How Diffusion Models Work for Image Generation 11: 28 generate. So these three are the key So these three are the key So these three are the key characteristics of a diffusion model. characteristics of a diffusion model. characteristics of a diffusion mo…
diffusion-lm-vizuara L5: Lecture 4: How Diffusion Models Work for Image Generation 12: 37 moving in a very uh straightforward manner for image generation and people manner for image generation and people manner for image generation and people were happy. There were companies which were hap…
diffusion-lm-vizuara L5: Lecture 4: How Diffusion Models Work for Image Generation 14: 14 And we are just going to start looking And we are just going to start looking at this field right now. I hope the at this field right now. I hope the at this field right now. I hope the motivation for…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 00: 05 Hello everyone and welcome to the third Hello everyone and welcome to the third lecture of this course principles of lecture of this course principles of lecture of this course principles of diffusion…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 01: 10 hidden factors or the factors which hidden factors or the factors which affect the variation in the data. For affect the variation in the data. For affect the variation in the data. For example, if we…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 02: 12 transform them into a Latin space with only two dimensions X and Y data. only two dimensions X and Y data. only two dimensions X and Y data. The Latin space the intuition behind The Latin space the in…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 03: 15 it's also called as a style variable it's also called as a style variable because it captures the style which is because it captures the style which is because it captures the style which is inherent …
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 04: 14 you get the image out of it. That is this machine is called as the decoder. this machine is called as the decoder. this machine is called as the decoder. So the decoder takes in the latent So the deco…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 05: 25 when we map the word hello into the areas of the Latin space, we don't just areas of the Latin space, we don't just areas of the Latin space, we don't just map it to one single value, but we map map i…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 06: 28 we saw the Latin space after the training is completed. It looks training is completed. It looks training is completed. It looks something like this. something like this. something like this. Now Now …
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 07: 29 space. You have a decoder which maps it back. How do you train the variation back. How do you train the variation back. How do you train the variation autoenccoder? What's the process that autoenccode…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 08: 32 distribution. So it tries to move the distribution in So it tries to move the distribution in So it tries to move the distribution in the latin space to a gshian the latin space to a gshian the latin …
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 09: 31 of the students of your class and let's of the students of your class and let's look at this factor which is neatness. look at this factor which is neatness. look at this factor which is neatness. Oka…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 10: 19 distributions that you see in in reality and that's what people try to capture and that's what people try to capture and that's what people try to capture over here. over here. over here. So mathemati…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 11: 19 understand uh the two types of losses understand uh the two types of losses which we are encountering here. Okay. So, uh the lower bound is called Okay. So, uh the lower bound is called as elbow which…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 12: 27 P of X is not possible to calculate. P of X is not possible to calculate. It's intractable It's intractable It's intractable because you need to calculate an because you need to calculate an because y…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 13: 24 say that is the recipe written in standard language. Does it follow a standard language. Does it follow a standard language. Does it follow a distribution which is shown in yellow? distribution which …
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 14: 34 And this is something we can clearly see from this image as well. Every single from this image as well. Every single from this image as well. Every single output image appears blur compared to output …
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 15: 33 linked to the decoder which means that linked to the decoder which means that we have to train two neural networks in we have to train two neural networks in we have to train two neural networks in th…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 16: 35 which you can see over here denoising which you can see over here denoising diffusion probabilistic models diffusion probabilistic models diffusion probabilistic models and this paper has over and thi…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 17: 42 literature. So diffusion models existed before as So diffusion models existed before as So diffusion models existed before as well but people had not proven that they well but people had not proven th…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 18: 36 authors have written. So for that purpose I would really recommend all of purpose I would really recommend all of purpose I would really recommend all of you to take a print out and keep it you to tak…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 19: 42 other corner of the room, right? So it's other corner of the room, right? So it's it's it's like the it's it's like the it's it's like the particles which are uh particles which are uh particles which…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 20: 45 of artificial intelligence. It sounded It sounded It sounded like ridiculous because how how can you like ridiculous because how how can you like ridiculous because how how can you apply this to AI, r…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 21: 44 AI and uh we are going to see how the AI and uh we are going to see how the diffusion technique is used for diffusion technique is used for diffusion technique is used for reproducing the original dat…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 22: 43 That's what we are going to think about because our primary intention is to because our primary intention is to because our primary intention is to reproduce the original or the true data reproduce th…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 23: 56 uniform and noisy removes all the uniform and noisy removes all the structure in the data. structure in the data. structure in the data. What if we think of our encoder as being What if we think of ou…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 24: 58 disappear. When people look at the final image, they have no idea that this came image, they have no idea that this came image, they have no idea that this came from Batman. This could have this this …
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 25: 58 step. First we will add some noise. Then step. First we will add some noise. Then we'll add another noise and then slowly we'll add another noise and then slowly we'll add another noise and then slowl…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 26: 59 am holding this bottle in front of me. I take an image of this and I want take an image of this and I want take an image of this and I want something which can transform this image something which can…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 27: 52 see all of these individual grids. They are one one pixel each and every single are one one pixel each and every single are one one pixel each and every single pixel holds some value. For example, pix…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 29: 18 obviously the value is not going to be 0.5. The value is going to be different 0.5. The value is going to be different 0.5. The value is going to be different than 0.5. It's either going to be than 0.…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 30: 03 the same deviation of of beta 1. and the same deviation of of beta 1. and then we'll again sample from it. then we'll again sample from it. then we'll again sample from it. So we will continue to do t…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 31: 06 this. You can see that it's not this. You can see that it's not completely noise but it's becoming completely noise but it's becoming completely noise but it's becoming noisier, right? It's it's slowl…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 32: 07 gshian transition kernel and you do it several times. several times. several times. So this is the process which is called So this is the process which is called So this is the process which is called…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 33: 16 Let's try to understand. Let's try to understand. Remember that we are preserving the mean Remember that we are preserving the mean Remember that we are preserving the mean value of the pixels. The me…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 34: 31 from a gshian which with a mean which is from a gshian which with a mean which is slightly scaled down from this mean. slightly scaled down from this mean. slightly scaled down from this mean. So this…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 36: 03 down the mean, we have made sure that down the mean, we have made sure that the mean of every single pixel goes down the mean of every single pixel goes down the mean of every single pixel goes down f…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 36: 59 bottles into pure noise. bottles into pure noise. And that happens for any data that you And that happens for any data that you And that happens for any data that you feed into the encoder. feed into …
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 38: 02 from where any image in the world can be generated. generated. generated. So essentially we are looking at So essentially we are looking at So essentially we are looking at something which is at the h…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 38: 51 >> This is given by this. The first image I'm going to denote as X0. The second I'm going to denote as X0. The second I'm going to denote as X0. The second image I'll denote as X1 and so on. Now image…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 39: 48 also called as noise schedule. So beta is what adds noise to the image. So beta is what adds noise to the image. So beta is what adds noise to the image. Uh and we have different betas because Uh and …
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 40: 38 uh find out values for your alphas? And this is something which uh even I And this is something which uh even I And this is something which uh even I was thinking for some time how are the was thinkin…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 41: 45 such that alpha square + beta square always becomes one. That is how you choose these alphas and That is how you choose these alphas and bet alphas. After you first choose the bet alphas. After you fi…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 43: 21 Okay. So in the first step we import our libraries. We are going to use numpy and libraries. We are going to use numpy and libraries. We are going to use numpy and uh mattplot lab for this example. So…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 44: 21 after 100 different steps. Maybe this number you might not even Maybe this number you might not even Maybe this number you might not even require to be this high, but people require to be this high, b…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 45: 21 our discussion as well. So let me run this. this. this. Okay. Now we do the u Okay. Now we do the u Okay. Now we do the u step-by-step forward diffusion process. step-by-step forward diffusion process…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 46: 15 So it's it's it's it's a simple trick So it's it's it's it's a simple trick which is to say that you which is to say that you which is to say that you uh keep the original value or rather you can say …
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 47: 26 before here the mu gets changed by before here the mu gets changed by alpha* alpha* alpha* alpha* the original pixel value and the alpha* the original pixel value and the alpha* the original pixel val…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 48: 24 total of 64x 64 pixels and for every total of 64x 64 pixels and for every single pixel we choose a random variable single pixel we choose a random variable single pixel we choose a random variable uh …
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 49: 11 there it really helps if we go step by step right you can't generate an image step right you can't generate an image step right you can't generate an image directly from noise that is too much directl…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 49: 56 structure disappears and it becomes uniform. So it satisfies our original uniform. So it satisfies our original uniform. So it satisfies our original criteria that if we want this to be criteria that …
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 50: 55 want to go directly from here to here. want to go directly from here to here. So there is a way to uh write the mean So there is a way to uh write the mean So there is a way to uh write the mean and t…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 51: 52 transition. If I give this as the output, then write down the effective output, then write down the effective output, then write down the effective mean and the effective variance for this mean and th…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 52: 37 disappear and the second tenant is the structure should become uniform with structure should become uniform with structure should become uniform with time. This is exactly what we did with time. This …
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 53: 31 that we are going to handle right now. So the the first intuition probably So the the first intuition probably So the the first intuition probably tells us that to go from noise to the tells us that t…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 54: 26 this image to noise is is is maybe scaling the mean by alpha and maybe scaling the mean by alpha and maybe scaling the mean by alpha and adding beta. Why don't we just upscale adding beta. Why don't w…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 55: 29 the original data. So this will become clear as as we go So this will become clear as as we go So this will become clear as as we go along. Let's let's move along. along. Let's let's move along. along…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 56: 26 right. So you can see that this is not like a you can see that this is not like a you can see that this is not like a one-time denoising step like we did for one-time denoising step like we did for on…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 57: 31 And that probability should be very And that probability should be very high, right? because we want our decoder high, right? because we want our decoder high, right? because we want our decoder to as…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 58: 30 So if we maximize that lower bound it So if we maximize that lower bound it also means that we are maximized the also means that we are maximized the also means that we are maximized the true objectiv…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 59: 34 before, we are going to get pure noise only. So there is no doubt that this is only. So there is no doubt that this is only. So there is no doubt that this is going to be pure noise. So this is going …
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 60: 26 So this is saying that I want to So this is saying that I want to minimize the kale divergence between minimize the kale divergence between these two probabilities. these two probabilities. these two …
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 61: 32 what we are trying to predict how do we actually go from x2 to x1 this is what actually go from x2 to x1 this is what actually go from x2 to x1 this is what our neural network will predict and our our…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 62: 24 true data. So if we achieve this, then we are anyways going to achieve a we are anyways going to achieve a we are anyways going to achieve a reconstruction which is that is good. reconstruction which …
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 63: 11 So let's let's take an example and if So let's let's take an example and if you are bothered by the word posterior you are bothered by the word posterior you are bothered by the word posterior don't w…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 64: 08 rain fell on this paper rain fell on this paper how did it look like? how did it look like? how did it look like? And that's very hard to tell because And that's very hard to tell because And that's v…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 65: 00 maybe if I just remove some noise it will look something similar to meat. will look something similar to meat. will look something similar to meat. This will look something similar to me This will loo…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 66: 00 you go from X3 to X2? That is the question. Okay, That is the question. Okay, That is the question. Okay, now now now you have access to x3 and you also have you have access to x3 and you also have yo…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 67: 05 fine but if we are able to predict this why can't we just why can't we just why can't we just match this directly to this? If if we match this directly to this? If if we match this directly to this? I…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 68: 18 by the way this is one path that you by the way this is one path that you take from the noise to the data data. take from the noise to the data data. take from the noise to the data data. This is anot…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 69: 14 understand first how how this posterior is is predicted. is is predicted. is is predicted. It turns out that this this reverse It turns out that this this reverse It turns out that this this reverse p…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 70: 29 How much importance should I place on X3 How much importance should I place on X3 and how much importance should I place and how much importance should I place and how much importance should I place o…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 71: 26 process. And I think we do have a graph which talks about it. Yeah. Yeah. Here. which talks about it. Yeah. Yeah. Here. which talks about it. Yeah. Yeah. Here. So here you see that uh the weightage on…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 72: 28 So, so you should read the time as this this to this. So, here we have the this to this. So, here we have the this to this. So, here we have the complete noisy image complete noisy image complete nois…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 73: 23 as a3 which is a function of all these as a3 which is a function of all these variances. variances. variances. So basically you go from uh the original So basically you go from uh the original So basi…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 74: 47 the original image to the final image in 100 steps. We have already seen how to 100 steps. We have already seen how to 100 steps. We have already seen how to uh write down this forward diffusion uh wr…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 75: 48 alphas and betas which is mentioned in the paper. So I have deliberately stayed the paper. So I have deliberately stayed the paper. So I have deliberately stayed away from it. I don't want to get too …
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 76: 53 to 49 48 47 and finally you move to to 49 48 47 and finally you move to the original image. So, so it actually the original image. So, so it actually the original image. So, so it actually works right…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 77: 45 their codes on GitHub. So this alpha actually represents alpha So this alpha actually represents alpha So this alpha actually represents alpha square in our notation and this beta square in our notati…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 78: 37 this beta is it it represents beta this beta is it it represents beta square which is the variance in our square which is the variance in our square which is the variance in our notation and alpha rep…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 79: 28 the image from noise. So the original the image from noise. So the original image will not be given to us. image will not be given to us. image will not be given to us. So basically we want to uh pred…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 80: 32 Okay. So now we have two gshian distributions. First goshian distributions. First goshian distributions. First goshian distribution we know the mean and distribution we know the mean and distribution …
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 81: 28 which we have predicted over here. >> [snorts] >> [snorts] >> So now it boils down to a simple uh >> So now it boils down to a simple uh >> So now it boils down to a simple uh algebraic manipulation. …
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 82: 23 really know. And now if you apply this formula mu of 5 - mu² formula mu of 5 - mu² formula mu of 5 - mu² what you see is you want to basically what you see is you want to basically what you see is you…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 83: 38 uh the reverse transition process will be same as that of the true posterior be same as that of the true posterior be same as that of the true posterior because then you have the same because then you…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 84: 32 it can be written as a function of the it can be written as a function of the original image original image original image and noise. and noise. and noise. Remember this was the homework which I Remem…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 85: 34 uh how much noise we are basically adding at each step. adding at each step. adding at each step. Okay. So uh but for now let's let's keep Okay. So uh but for now let's let's keep Okay. So uh but for …
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 86: 55 So So this is what this means. So x0 can in fact be written in as in in this way. in fact be written in as in in this way. in fact be written in as in in this way. And in the paper what they do is sin…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 87: 53 >> Now you see the uh simplicity of this. >> Now you see the uh simplicity of this. What this essentially means is that What this essentially means is that What this essentially means is that what I n…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 88: 51 we have imparted at each transition. Once we have this noise level, we can Once we have this noise level, we can Once we have this noise level, we can actually calculate the the the images at every si…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 90: 09 equation which which they get uh you know and here you see we finally uh you know and here you see we finally uh you know and here you see we finally have epsilon minus epsilon theta whole have epsilo…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 91: 17 diffusion models and and why they work. diffusion models and and why they work. So uh please take a print out and go So uh please take a print out and go So uh please take a print out and go through a…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 92: 13 encoder as a goshian transition kernel with a specific mean and variance. And with a specific mean and variance. And with a specific mean and variance. And we have different iterations which go we hav…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 93: 05 first two terms are exactly same like we saw in VAS. The regularization term is saw in VAS. The regularization term is saw in VAS. The regularization term is not important here because we already not …
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 93: 54 posterior in a very tractable way. And we saw that it can be written as a we saw that it can be written as a we saw that it can be written as a gshian with a mean and a variance. The gshian with a mea…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 94: 42 more, we we found out that at the heart of it, we want to make sure that the of it, we want to make sure that the of it, we want to make sure that the original image true data which original image tru…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 95: 40 in the forward diffusion process. in the forward diffusion process. And this this makes a lot of sense. And this this makes a lot of sense. And this this makes a lot of sense. That's why the name dino…
diffusion-principles-vizuara L8: Lecture 3 - Introduction to Diffusion Models (DDPM) | Principles of Diffusion Models 96: 26 please let me know and just just sit down and go through and just just sit down and go through and just just sit down and go through this homework problem where you find the this homework problem wher…