KimRass / DDIM

PyTorch implementation of 'DDIM' (Jiaming Song et al., 2020).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

1. Sampling

1) "normal" Mode

mode="normal", trunc_normal_thresh=None

2) "interpolation" Mode

mode="inerpolation"

3) "interpolation_on_grid" Mode

mode="inerpolation_on_grid"

2. Experiments

1) Truncated Normal

mode="normal", trunc_normal_thresh=0.1 mode="normal", trunc_normal_thresh=0.5
mode="normal", trunc_normal_thresh=1 mode="normal", trunc_normal_thresh=1.5
mode="normal", trunc_normal_thresh=2 mode="normal", trunc_normal_thresh=2.5
mode="normal", trunc_normal_thresh=3

3. Theoretical Background

  • "Predicted $x_{0}$": $$\frac{x_{t} - \sqrt{1 - \alpha_{t}}\epsilon_{\theta}^{(t)}(x_{t})}{\sqrt{\alpha_{t}}}$$
  • "Direction pointing to $x_{t}$": $$\sqrt{1 - \alpha_{t - 1} - \sigma_{t}^{2}} \epsilon_{\theta}^{(t)}(x_{t})$$

1) Backward (Denoising) Process

$$x_{t - 1} = \sqrt{\alpha_{t - 1}}\Bigg(\frac{x_{t} - \sqrt{1 - \alpha_{t}}\epsilon_{\theta}}{\sqrt{\alpha_{t}}}\Bigg) + \sqrt{1 - \alpha_{t - 1}}\epsilon_{\theta}$$

About

PyTorch implementation of 'DDIM' (Jiaming Song et al., 2020).


Languages

Language:Python 95.6%Language:Shell 4.4%