All problems
DPM-Solver Step
Problem
One first-order DPM-Solver step in log-SNR space. With alpha = sqrt(alpha_bar), sigma = sqrt(1 - alpha_bar), lambda = log(alpha / sigma) and h = lambda_prev - lambda_t, the update is x_prev = (sigma_prev / sigma_t) * x_t - alpha_prev * (exp(-h) - 1) * eps_pred.
The signature is dpm_solver_step(x_t, eps_pred, alpha_bar_t, alpha_bar_prev). All values are scalars.
Hint
Solving the probability-flow ODE in log-SNR space makes the step sizes uniform.
Test cases
case 1
in: [1,0,0.5,0.8]
expected: 0.632455532
case 2
in: [0.5,1,0.2,0.5]
expected: 0.7488380981
case 3
in: [-1,0.5,0.3,0.6]
expected: -0.5756502792
case 4
in: [2,-1,0.5,0.9]
expected: 0.261971659
Starter codePython
import math
def dpm_solver_step(x_t, eps_pred, alpha_bar_t, alpha_bar_prev):
# Your code here
pass4 test cases · run your code against them in the editor