Online Demo! Run it in your web browser
- 第一集: https://www.bilibili.com/video/BV1tz4y1h7q1 | 正态分布 | 基本设定 | 公式推导 |
- 第二集: https://www.bilibili.com/video/BV1xQ4y1w7ex | 神经网络 | 概率空间 | 边缘概率 | 各向同性高斯分布 |
- 第三集: https://www.bilibili.com/video/BV1hZ421y7id | 三维动画展示全过程
- 第四集: https://www.bilibili.com/video/BV1gK421b7W9 | 神经网络的学习目标以及训练
- 第五集: https://www.bilibili.com/video/BV12y421z7Mh/ | 花絮 | 热度图制作细节揭秘
UPDATE:
- 2024-07-14 : Update online sample to use
WebGPU
if possible - 2024-07-15 : Added DDIM sampling method
-
$q$ - a fixed (or predefined) forward diffusion process of adding Gaussian noise to an image gradually, until ending up with pure noise -
$p_θ$ - a learned reverse denoising diffusion process, where a neural network is trained to gradually denoise an image starting from pure noise, until ending up with an actual image.
Both the forward and reverse process indexed by
This process is a markov chain,
-
$β_t$ is not constant at each time step$t$ . In fact one defines a so-called "variance schedule", which can be linear, quadratic, cosine, etc.
-
$\epsilon_{t}$ Gaussian noise, sampled from standard normal distribution.
Define
Because $N(\mu_{1},\sigma_{1}^{2}) + N(\mu_{2},\sigma_{2}^{2}) = N(\mu_{1}+\mu_{2},\sigma_{1}^{2} + \sigma_{2}^{2})$
$x_t = \sqrt{a_{t}a_{t-1}}\times x_{t-2} + \sqrt{1-a_{t}a_{t-1}}\times \epsilon$ $x_t = \sqrt{a_{t}a_{t-1}a_{t-2}}\times x_{t-3} + \sqrt{1-a_{t}a_{t-1}a_{t-2}}\times \epsilon$ $x_t = \sqrt{a_{t}a_{t-1}a_{t-2}a_{t-3}...a_{t-(k-2)}a_{t-(k-1)}}\times x_{t-k} + \sqrt{1-a_{t}a_{t-1}a_{t-2}a_{t-3}...a_{t-(k-2)}a_{t-(k-1)}}\times \epsilon$ $x_t = \sqrt{a_{t}a_{t-1}a_{t-2}a_{t-3}...a_{2}a_{1}}\times x_{0} + \sqrt{1-a_{t}a_{t-1}a_{t-2}a_{t-3}...a_{2}a_{1}}\times \epsilon$
$$\bar{a}{t} := a{t}a_{t-1}a_{t-2}a_{t-3}...a_{2}a_{1}$$
Because
|
~ |
|
|
~ |
|
|
~ |
|
Because
Note: This README.md
is intended solely for previewing on the Github page. If you wish to view the rendered page locally, please consult README.raw.md
.