Skip to contents

x0 = (x_t - sqrt(1 - ab_t) eps) / sqrt(ab_t), then re-noise to t_prev with eta = 0. Timestep indices are 0-based into alpha_bar.

Usage

morie_geron_ddim_sampling_step(
  x_t,
  t,
  t_prev,
  eps_pred,
  alpha_bar,
  clip_x0 = NULL
)

Arguments

x_t

Current sample.

t, t_prev

0-based timesteps, t_prev < t.

eps_pred

Noise prediction.

alpha_bar

Non-increasing schedule in (0, 1].

clip_x0

Optional c(lo, hi) clamp on x0.

Value

List with x_prev, x0_pred, alpha_bar_t, alpha_bar_prev, signal_scale, noise_scale.

Examples

morie_geron_ddim_sampling_step(c(1, -0.5), t = 3, t_prev = 1,
    eps_pred = c(0.2, 0.1), alpha_bar = c(1, 0.9, 0.8, 0.5))
#> $x_prev
#> [1]  1.2151497 -0.7340659
#> 
#> $x0_pred
#> [1]  1.2142136 -0.8071068
#> 
#> $alpha_bar_t
#> [1] 0.5
#> 
#> $alpha_bar_prev
#> [1] 0.9
#> 
#> $signal_scale
#> [1] 0.9486833
#> 
#> $noise_scale
#> [1] 0.3162278
#> 
#> $t
#> [1] 3
#> 
#> $t_prev
#> [1] 1
#> 
#> $estimate
#> [1] 0.2405419
#> 
#> $n
#> [1] 2
#> 
#> $method
#> [1] "DDIM deterministic sampling step"
#>