VerifiedarXiv:2206.0036436 min
Diffusion · Sampling · Training

EDM: Elucidating the Design Space of Diffusion-Based Generative Models

A diffusion model is a short list of independent choices, and each one can be picked well on its own.

This paper, known as EDM, rewrites DDPM, score SDEs and DDIM in one framework: a denoiser, an ODE whose time variable is the noise level, and a table of separate choices for the noise schedule, the step spacing, the solver, the network scaling and the loss. Picking each choice well reaches FID 1.97 on CIFAR-10 in 35 network evaluations.

Explaining the paperElucidating the Design Space of Diffusion-Based Generative ModelsKarras, Aittala, Aila, Laine · NVIDIA · NeurIPS 2022 · arXiv:2206.00364 ↗

Take a diffusion model somebody else trained, swap in a different sampler, and get the same image quality in 35 network calls instead of 256. Then retrain with a different loss and beat the state of the art.

By mid-2022 there were three well-known ways to build a diffusion model, and each came as a package. DDPM defined a Markov chain over 1000 discrete steps and derived its loss from a variational bound. Song et al.'s score SDE work replaced the chain with a stochastic differential equation and trained a network to output the score, the gradient of the log density. DDIM kept DDPM's network and found a deterministic sampler for it. Each paper fixed its noise schedule, its time discretisation, its network input and output scaling, and its loss weighting together, and derived them from the same underlying theory, so a reader could not tell which choices mattered and which were incidental.

Karras, Aittala, Aila and Laine at NVIDIA set out to separate the choices. The paper does three things. It rewrites all three families as one denoiser plus one ordinary differential equation, with every remaining decision listed in a single table. It then improves sampling, on models it did not train: a better time discretisation, a second-order solver, a better noise schedule, and a tuned amount of injected noise, which together cut the network evaluations needed for a given FID by 7.3× on the VP (variance-preserving) model and 300× on the VE (variance-exploding) model, the two pre-trained score SDE networks, and 3.2× on DDIM. And it improves training: a principled scaling of the network's inputs, outputs and skip connection, a loss weighting that makes every noise level start at loss 1, a log-normal distribution over which noise levels to train on, and image augmentation that does not leak into the generated images. The retrained models reach FID 1.79 on class-conditional CIFAR-10, 1.97 unconditional, and 1.36 on ImageNet 64×64, with 35 network evaluations per CIFAR-10 image.

FID, the Fréchet inception distance, compares the mean and covariance of generated and real images in the feature space of an Inception classifier, computed here on 50,000 generated images; lower is better. NFE, the number of function evaluations, counts how many times the denoiser network runs per generated image, which is what sampling time is proportional to. The rest of this page follows the paper's order: the framework, then sampling, then training.

One denoiser, one ODE

Start with a data distribution pdata(x)p_{\text{data}}(\mathbf{x}) of images scaled to [−1,1][-1, 1], with per-pixel standard deviation σdata\sigma_{\text{data}}, which the paper takes to be 0.5. Adding Gaussian noise of standard deviation σ\sigma to every image gives a blurred distribution p(x;σ)p(\mathbf{x}; \sigma). For σ=0.002\sigma = 0.002 it is indistinguishable from the data; for σ=80\sigma = 80 it is indistinguishable from pure noise, because a signal of amplitude 0.5 buried under noise of amplitude 80 contributes nothing an observer could recover. Generation runs from noise level 80 down to 0: draw x0∼N(0,802I)\mathbf{x}_0 \sim \mathcal{N}(\mathbf{0}, 80^2 \mathbf{I}), and move it through a sequence of noise levels σ0=80>σ1>⋯>σN=0\sigma_0 = 80 > \sigma_1 > \dots > \sigma_N = 0 so that at each stage the sample is distributed as p(x;σi)p(\mathbf{x}; \sigma_i). Whatever arrives at σN=0\sigma_N = 0 is a sample from the data.

The tool for moving between noise levels is a denoiser. Define D(x;σ)D(\mathbf{x}; \sigma) as the function that minimises the squared error of reconstructing a clean image from its noisy version, at every noise level separately:

Ey∼pdata En∼N(0,σ2I)∥D(y+n;σ)−y∥22\mathbb{E}_{\mathbf{y} \sim p_{\text{data}}}\, \mathbb{E}_{\mathbf{n} \sim \mathcal{N}(\mathbf{0}, \sigma^2 \mathbf{I})} \big\lVert D(\mathbf{y} + \mathbf{n}; \sigma) - \mathbf{y} \big\rVert_2^2
(2)

The minimiser of a squared error is a conditional mean, so D(x;σ)D(\mathbf{x}; \sigma) is the average of every clean image that could have produced x\mathbf{x}, weighted by how likely each was to do so. For a finite dataset of YY images that average has a closed form (paper Appendix B.3):

D(x;σ)=∑iN(x;yi,σ2I) yi∑iN(x;yi,σ2I)D(\mathbf{x}; \sigma) = \frac{\sum_i \mathcal{N}(\mathbf{x}; \mathbf{y}_i, \sigma^2 \mathbf{I})\, \mathbf{y}_i}{\sum_i \mathcal{N}(\mathbf{x}; \mathbf{y}_i, \sigma^2 \mathbf{I})}

Take a one-dimensional dataset of three points, {−1.25,−0.35,1.05}\{-1.25, -0.35, 1.05\}, and ask what the ideal denoiser returns at x=0.2x = 0.2 with σ=0.5\sigma = 0.5. The three Gaussian weights are 0.0149, 0.5461 and 0.2357, so the point at −1.25 contributes almost nothing and D=0.0474D = 0.0474, a value between the two nearest data points, closer to the nearer one. At σ=80\sigma = 80 the three weights are nearly equal for any xx in the plausible range, and DD returns the dataset mean, −0.183, whatever the input. An ideal denoiser has three regimes: at low noise it snaps to the nearest data point, at high noise it returns the mean, and in between it returns a blend.

Differentiating the log of the blurred density gives the score, and it comes out in terms of the same denoiser:

∇xlog⁡p(x;σ)=(D(x;σ)−x)/σ2\nabla_{\mathbf{x}} \log p(\mathbf{x}; \sigma) = \big( D(\mathbf{x}; \sigma) - \mathbf{x} \big) / \sigma^2
(3)

In the worked example the score at x=0.2x = 0.2 is (0.0474−0.2)/0.25=−0.61(0.0474 - 0.2)/0.25 = -0.61: it points toward the two data points on the left. Identity (3) is why nobody needs the normalising constant of p(x;σ)p(\mathbf{x}; \sigma): a network trained by plain regression on (2) yields the score by a subtraction and a division. The NCSN line of work trained for the score directly; EDM treats every score network, including those, as a denoiser, and everything from here on is written in terms of DD.

To move a sample between noise levels without changing which distribution it follows, the paper uses the probability-flow ODE from the score SDE paper. Choose a schedule σ(t)\sigma(t) that says what the noise level is at time tt. Then the ODE

dx=−σ˙(t) σ(t) ∇xlog⁡p(x;σ(t)) dt\mathrm{d}\mathbf{x} = -\dot\sigma(t)\, \sigma(t)\, \nabla_{\mathbf{x}} \log p\big(\mathbf{x}; \sigma(t)\big)\, \mathrm{d}t
(1)

has the property that a sample of p(x;σ(ta))p(\mathbf{x}; \sigma(t_a)) evolved from tat_a to tbt_b, forward or backward, is a sample of p(x;σ(tb))p(\mathbf{x}; \sigma(t_b)). Forward in time the noise level rises and the equation pushes the sample away from the data along the score; backward it pulls the sample toward the data. Substituting (3) and choosing the schedule σ(t)=t\sigma(t) = t (the time variable is the noise level itself) turns (1) into

dxdt=x−D(x;t)t\frac{\mathrm{d}\mathbf{x}}{\mathrm{d}t} = \frac{\mathbf{x} - D(\mathbf{x}; t)}{t}

Read the right-hand side as a direction: from the current point, aim away from the denoiser's guess of the clean image, scaled by one over the current noise level. Going backward in time reverses it: aim at the guess. In the worked example, at x=0.2x = 0.2 and t=0.5t = 0.5 the velocity is (0.2−0.0474)/0.5=0.305(0.2 - 0.0474)/0.5 = 0.305, and one Euler step backward from t=0.5t = 0.5 to t=0.3t = 0.3 moves the point to 0.2−0.2×0.305=0.1390.2 - 0.2 \times 0.305 = 0.139. Generation is this step repeated from t=80t = 80 to t=0t = 0, with a neural network DθD_\theta standing in for the ideal DD.

Some families also scale the signal over time. DDPM-style models keep the total variance near one by shrinking the image as noise is added, so their state is x=s(t) x^\mathbf{x} = s(t)\, \hat{\mathbf{x}} for a scale function s(t)s(t) and an unscaled variable x^\hat{\mathbf{x}}. The general ODE that covers this case is

dx=[s˙(t)s(t) x−s(t)2 σ˙(t) σ(t) ∇xlog⁡p ⁣(xs(t);σ(t))]dt\mathrm{d}\mathbf{x} = \left[ \frac{\dot s(t)}{s(t)}\, \mathbf{x} - s(t)^2\, \dot\sigma(t)\, \sigma(t)\, \nabla_{\mathbf{x}} \log p\!\left( \frac{\mathbf{x}}{s(t)}; \sigma(t) \right) \right] \mathrm{d}t
(4)

and the paper's Appendix B.2 shows that every probability-flow ODE in the literature is (4) for some pair σ(t),s(t)\sigma(t), s(t): changing σ(t)\sigma(t) reparameterises time, changing s(t)s(t) reparameterises the state, and neither changes the path a sample takes through the space of noise levels. The table below lists the remaining choices as rows. Each column is a published method, and the rows can be mixed across columns.

Table 1 (abridged)VPVEiDDPM + DDIMEDM
ODE solverEulerEulerEulerHeun (2nd order)
time stepslinear in tgeometric in σevery k-th of 1000Eq. (5), ρ = 7
schedule σ(t)√(exp(½β_d t² + β_min t) − 1)√ttt
scaling s(t)1/√(exp(½β_d t² + β_min t))111
c_skip(σ)111σ_d² / (σ² + σ_d²)
c_out(σ)−σσ−σσ σ_d / √(σ² + σ_d²)
c_in(σ)1/√(σ² + 1)11/√(σ² + 1)1/√(σ² + σ_d²)
c_noise(σ)999 · σ⁻¹(σ)ln(½σ)index of nearest level¼ ln σ
training σt ~ U(10⁻⁵, 1)ln σ ~ U(ln 0.02, ln 100)one of 1000 levelsln σ ~ N(−1.2, 1.2²)
weight λ(σ)1/σ²1/σ²1/σ²(σ² + σ_d²) / (σ σ_d)²

The VP constants are βd=19.9\beta_d = 19.9 and βmin⁡=0.1\beta_{\min} = 0.1, which put its noise level at t=1t = 1 at 152 and its scale at 0.0066, so the scaled state has unit variance there. VE runs σ\sigma from 0.02 to 100; EDM from 0.002 to 80. The four cc functions in the middle block describe how each method wraps its raw network, and they are the subject of the preconditioning section below.

Time is the noise level

A numerical ODE solver replaces the curve x(t)\mathbf{x}(t) with straight segments, and the error of each segment grows with how much the curve bends over it. So a schedule that makes the solution paths straight in the (t,x)(t, \mathbf{x}) plane is a schedule that lets the solver take fewer, longer steps. The paper argues that σ(t)=t\sigma(t) = t with s(t)=1s(t) = 1 is that schedule, for the following reason. With it, a single Euler step from any (x,t)(\mathbf{x}, t) all the way to t=0t = 0 lands at x−t⋅(x−D)/t=D(x;t)\mathbf{x} - t \cdot (\mathbf{x} - D)/t = D(\mathbf{x}; t), the denoiser's output. The tangent of every solution path points at the current denoised image. At high noise that image is close to the dataset mean and barely changes as the noise level drops; at low noise it is close to the nearest data point and again barely changes. Only in a middle band, where the denoiser is switching from "the mean" to "this particular image", does the tangent swing, and there the path curves.

Figure 1 draws the exact solution paths for the three-point dataset in the time coordinate of each schedule. With σ(t)=t\sigma(t) = t the paths are straight lines fanning out from the three data points, bending only in a band around t≈0.5t \approx 0.5 where the denoiser switches between points. Switch to the VE schedule, σ(t)=t\sigma(t) = \sqrt{t}, and the same paths, plotted against t=σ2t = \sigma^2, become parabolic arcs. Switch to VP and the s(t)s(t) scaling squeezes the fan toward zero at high noise and bends every path. Hovering the plot draws the tangent at that point extended to t=0t = 0, which is where a single Euler step from there would land, next to the denoiser's output at the same point.

Figure 1 · solution paths under three schedules
Teal curves are exact solutions of (4) for a dataset of three amber points (each a Gaussian blob of width 0.15, so the denoiser stays smooth at low noise), drawn in the (t,x)(t, x) plane of the selected schedule. Hover or touch a point: the dashed line is the tangent there, extended to t=0t = 0, and the hollow amber ring is D(x;σ)D(x; \sigma) for that point. With σ(t) = t the two coincide at every point; under VE the tangent lands halfway to DD, under VP elsewhere again.

Under VE the single Euler step lands only halfway to DD, because in t=σ2t = \sigma^2 the slope at the start of the step is half the average slope across it; under VP the scaling term adds a further bend. On real models the effect is the teal curves of Figure 4 below (red in the paper's Fig. 2): keep the pre-trained VP network and change only the schedule the sampler integrates in, and FID goes from 2.88 at 255 evaluations to 2.93 at 35. DDIM already uses σ(t)=t\sigma(t) = t, so its curve does not move.

Where to put the steps

The solver also needs the discrete noise levels σ0>σ1>⋯>σN−1\sigma_0 > \sigma_1 > \dots > \sigma_{N-1} at which it evaluates the network, and Appendix D.1 measures where the error comes from. With uniform steps in σ\sigma of width 1.25 on the VE CIFAR-10 model, one Euler step incurs a root-mean-square error of about 0.56 per pixel value at σ≤0.5\sigma \le 0.5 and far less at high noise. The steps therefore have to shrink as the noise level falls. The paper parameterises the spacing with one exponent:

σi<N=(σmax⁡1/ρ+iN−1(σmin⁡1/ρ−σmax⁡1/ρ))ρ,σN=0\sigma_{i<N} = \Big( \sigma_{\max}^{1/\rho} + \frac{i}{N-1} \big( \sigma_{\min}^{1/\rho} - \sigma_{\max}^{1/\rho} \big) \Big)^{\rho}, \qquad \sigma_N = 0
(5)

with σmin⁡=0.002\sigma_{\min} = 0.002 and σmax⁡=80\sigma_{\max} = 80. At ρ=1\rho = 1 the levels are evenly spaced in σ\sigma; as ρ\rho grows they crowd toward σmin⁡\sigma_{\min}, and in the limit they become the geometric sequence of the original VE sampler. For N=18N = 18 and ρ=7\rho = 7 the levels are 80, 57.6, 40.8, 28.4, 19.4, 12.9, 8.40, 5.32, 3.26, 1.92, 1.09, 0.585, 0.296, 0.140, 0.060, 0.023, 0.0075, 0.002, then 0. The first step divides the noise level by 1.39, the last by 3.8: a geometric spacing would divide by 1.87 every time, so ρ=7\rho = 7 takes smaller multiplicative steps at the top and larger ones at the bottom than a geometric spacing would, spending more of its budget on high noise levels.

Figure 2 · the step-spacing exponent rho
718
The NN levels of (5) as ticks on a linear axis and on a log axis, amber for σmax⁡\sigma_{\max} and σmin⁡\sigma_{\min}. At ρ = 1 the log axis is almost empty below 1; at ρ = 7 seven of the eighteen ticks sit below σ = 1. The readout gives the ratio of the first and the last step.

The value of ρ\rho is chosen against two different targets. Measured per-step numerical error is most even across noise levels at ρ=3\rho = 3; with Heun's method that setting keeps the per-step RMSE within 0.0030 to 0.0045 everywhere. FID, however, keeps improving up to ρ\rho between 5 and 10, because errors at low noise damage the image more than errors at high noise, where the exact value of σmax⁡\sigma_{\max} was arbitrary to begin with. The paper fixes ρ=7\rho = 7 for everything else. When a pre-trained model only supports a discrete set of levels, as the 1000-step ImageNet model does, each σi\sigma_i is rounded to the nearest level the model was trained on.

Heun: two network calls per step

Euler's method evaluates the slope at the start of a step and assumes it holds across the step, which is a local error of order h2h^2 in the step size hh. Heun's method, also called the improved Euler method or the explicit trapezoidal rule, takes the Euler step, evaluates the slope again at the landing point, and then re-takes the step with the average of the two slopes. Its local error is of order h3h^3, at the cost of one extra network evaluation per step. The paper's Algorithm 1 is exactly this, written for a general σ(t),s(t)\sigma(t), s(t); with σ(t)=t\sigma(t) = t and s(t)=1s(t) = 1 it reduces to the code the authors ship:

# Algorithm 1 with sigma(t)=t, s(t)=1 (generate.py, edm_sampler, S_churn=0)
t = edm_levels(N=18, rho=7, smin=0.002, smax=80)   # 18 levels, then t[18] = 0
x = randn(B, 3, 32, 32) * t[0]                     # x_0 ~ N(0, 80^2 I)
for i in range(18):                                # 35 calls of D in total
    d  = (x - D(x, t[i])) / t[i]                   # dx/dt at t_i, Eq. (1)
    xe = x + (t[i+1] - t[i]) * d                   # Euler step to t_{i+1}
    if t[i+1] > 0:                                 # no correction at t = 0
        d2 = (xe - D(xe, t[i+1])) / t[i+1]         # slope at the landing point
        xe = x + (t[i+1] - t[i]) * (d + d2) / 2    # trapezoid: mean of slopes
    x = xe

The step to t=0t = 0 cannot evaluate the slope at the landing point, since the slope divides by tt, so the last step is a plain Euler step. That is why 18 steps cost 35 evaluations and 40 steps cost 79, and why every NFE in the paper's Heun results is odd. The worked example continues: from x=0.2x = 0.2 at t=0.5t = 0.5, the Euler step landed at 0.139 for t=0.3t = 0.3. The denoiser at that landing point returns −0.299, so the second slope is (0.139+0.299)/0.3=1.46(0.139 + 0.299)/0.3 = 1.46, five times the first slope of 0.305. Averaging the two and re-taking the step gives 0.2−0.2×0.883=0.0230.2 - 0.2 \times 0.883 = 0.023, a much larger move toward the point −0.35 than Euler's. The second evaluation measures how much the slope changes inside the step, which a single evaluation at the start cannot.

Figure 3 runs both solvers on a two-dimensional dataset of six clusters, with the same 14 starting points, the same ρ=7\rho = 7 levels, and an exact solution for comparison. Drag NN and read the two error numbers. At N=1N = 1 both solvers take the single step to D(x0;σmax⁡)D(\mathbf{x}_0; \sigma_{\max}) and every path collapses onto the centre of the data. For NN up to 5 Heun is no better than Euler at the same NN, and at N=3N = 3 one of its paths shoots off the canvas: the first step lands near the centre, the second slope is evaluated there at σ=0.40\sigma = 0.40 where the denoiser already points hard at one cluster, and averaging in that slope over a step of width 7.6 overshoots. From N=6N = 6 Heun at NN steps matches Euler at 2N2N steps, the fair comparison at equal NFE, and from there the gap opens: at N=12N = 12 Heun's endpoint error is 0.046 against 0.26 for Euler at 24 steps, and at N=18N = 18 (35 NFE) it is 0.017 against 0.24.

Figure 3 · Euler against Heun at the same step count
6
Fourteen paths start far from six amber clusters and are integrated to σ = 0 with NN steps of Euler or Heun, over the exact paths in faint teal. The header reports each solver's NFE and RMS endpoint error. Hide one solver with the tabs to compare its polylines against the exact curves; at N=3N = 3 the Heun overshoot described in the text is the path leaving the frame.

On the three pre-trained models the paper stacks its sampling changes one at a time, and Figure 4 shows the resulting FID against NFE. The original samplers (grey) are re-implemented inside the framework (violet) and come out slightly better because of small oversights in the original code and a more careful handling of DDIM's discrete levels. Adding Heun and the ρ=7\rho = 7 levels (amber) reaches the same FID at far fewer evaluations: the VP model goes from FID 2.79 at 512 evaluations to 2.88 at 255, the VE model from 4.78 at 8192 to 4.23 at 191, and ImageNet-64 from 2.73 at 384 to 2.64 at 79. Setting σ(t)=t\sigma(t) = t (teal) then brings VP to 2.93 at 35 and VE to 3.73 at 27. The dashed adaptive RK45 solver, run with the same schedule, needs 115, 93 and 131 evaluations for comparable FID, so its adaptivity does not pay for itself here.

Figure 4 · FID against network evaluations, deterministic sampling
The paper's Fig. 2 data. Both axes are logarithmic. Pick a model with the tabs; hover a column to read every curve's value at the nearest measured NFE. At the lowest NFE the amber curve (Heun, same schedule as the violet Euler curve) is behind it, because two calls per step leave it only four to seven steps; from about 20 evaluations Heun is ahead.

Appendix D.2 also tries the other two-stage second-order Runge-Kutta variants, which evaluate the second slope at a fraction α\alpha of the way across the step: midpoint (α=1/2\alpha = 1/2), Ralston (2/32/3), Heun (11). The measured optimum was α=1.1\alpha = 1.1, which overshoots the step and has no theoretical justification, so the authors kept α=1\alpha = 1. Heun has a further practical advantage: its second evaluation sits exactly at ti+1t_{i+1}, a level a discretely trained network has seen, whereas the midpoint variants evaluate the network at levels in between.

Adding noise back on purpose

Deterministic sampling has one output per starting noise and can be inverted to encode a real image, but the score SDE paper and DDIM both reported that adding fresh noise during sampling gives better FID. Since the ODE and the SDE produce the same marginal distributions in theory, what does the noise do? The paper writes the general SDE as the probability-flow ODE plus a Langevin term:

dx±=−σ˙(t)σ(t)∇xlog⁡p(x;σ(t)) dt⏟probability-flow ODE (1)  ±  β(t)σ(t)2∇xlog⁡p(x;σ(t)) dt⏟deterministic noise decay+2β(t) σ(t) dωt⏟noise injection\mathrm{d}\mathbf{x}_{\pm} = \underbrace{-\dot\sigma(t)\sigma(t)\nabla_{\mathbf{x}} \log p(\mathbf{x}; \sigma(t))\,\mathrm{d}t}_{\text{probability-flow ODE (1)}} \;\pm\; \underbrace{\beta(t)\sigma(t)^2 \nabla_{\mathbf{x}} \log p(\mathbf{x}; \sigma(t))\,\mathrm{d}t}_{\text{deterministic noise decay}} + \underbrace{\sqrt{2\beta(t)}\,\sigma(t)\,\mathrm{d}\omega_t}_{\text{noise injection}}dx±=−σ˙(t)σ(t)∇xlog⁡p(x;σ(t)) dt⏟probability-flow ODE (1)  ±  β(t)σ(t)2∇xlog⁡p(x;σ(t)) dt⏟deterministic noise decay+2β(t) σ(t) dωt⏟noise injection\begin{aligned} \mathrm{d}\mathbf{x}_{\pm} = &\underbrace{-\dot\sigma(t)\sigma(t)\nabla_{\mathbf{x}} \log p(\mathbf{x}; \sigma(t))\,\mathrm{d}t}_{\text{probability-flow ODE (1)}} \\ &\;\pm\; \underbrace{\beta(t)\sigma(t)^2 \nabla_{\mathbf{x}} \log p(\mathbf{x}; \sigma(t))\,\mathrm{d}t}_{\text{deterministic noise decay}} \\ &+ \underbrace{\sqrt{2\beta(t)}\,\sigma(t)\,\mathrm{d}\omega_t}_{\text{noise injection}} \end{aligned}
(6)

with ωt\omega_t a standard Wiener process, the plus sign for forward time and the minus sign for the reverse SDE used in generation. The two Langevin terms cancel in their effect on the noise level: the decay term, by (3), equals β(t)(D−x) dt\beta(t)(D - \mathbf{x})\,\mathrm{d}t, which removes a fraction of the current noise, and the injection term adds the same amount back. So β(t)\beta(t) sets the rate at which existing noise is swapped for new noise, and any choice of it preserves the marginals. The score SDE paper's SDEs correspond to the particular choice β(t)=σ˙(t)/σ(t)\beta(t) = \dot\sigma(t)/\sigma(t), for which the score term drops out of the forward SDE; Karras et al. point out that nothing makes that choice special, and that the amount of churn should be tuned empirically.

Why does churn help? The Langevin term pulls the sample toward the correct marginal at the current noise level, so it corrects errors the earlier steps made. With an exact denoiser and infinitesimal steps there would be nothing to correct. With a learned denoiser and 18 steps there is, and the correction is worth having up to the point where its own discretisation error and the denoiser's imperfections take over.

The paper's stochastic sampler, Algorithm 2, keeps the Heun step and adds the churn as a separate sub-step. At step ii with the sample at noise level tit_i, first raise the noise level to t^i=ti+γiti\hat t_i = t_i + \gamma_i t_i by adding fresh Gaussian noise of standard deviation t^i2−ti2\sqrt{\hat t_i^2 - t_i^2}, then take one Heun step of the ODE from t^i\hat t_i down to ti+1t_{i+1}. Each sub-step keeps the sample on the correct marginal (up to the ODE step's truncation error), so their alternation does too. The difference from a textbook Euler-Maruyama step is that the network is evaluated at the state after the noise was added, (x^i,t^i)(\hat{\mathbf{x}}_i, \hat t_i), rather than at the state before it. In the limit of tiny steps the two agree; at 18 steps they do not.

Three constants set the churn per step:

γi={min⁡ ⁣(Schurn/N,  2−1)if ti∈[Stmin,Stmax]0otherwise\gamma_i = \begin{cases} \min\!\big( S_{\text{churn}} / N,\; \sqrt{2} - 1 \big) & \text{if } t_i \in [S_{\text{tmin}}, S_{\text{tmax}}] \\ 0 & \text{otherwise} \end{cases}

The clamp at 2−1=0.414\sqrt 2 - 1 = 0.414 means t^i≤2 ti\hat t_i \le \sqrt 2\, t_i, and the added noise then has standard deviation at most ti2−1=tit_i \sqrt{2 - 1} = t_i: a step never injects more new noise than the noise already present. The range [Stmin,Stmax][S_{\text{tmin}}, S_{\text{tmax}}] switches churn off at very low and very high noise levels, where it was found to oversaturate colours. A fourth constant, SnoiseS_{\text{noise}}, multiplies the injected noise; values slightly above 1 (1.003 to 1.007) restore detail that heavy churn washes out, which the authors read as the learned denoiser removing slightly too much noise, the regression toward the mean expected of any denoiser trained with a squared loss.

Figure 5 runs Algorithm 2 on the six-cluster toy. The left panel shows the noise level over the 18 steps, an amber climb followed by a teal descent at each step; the right panel shows one sample path with the same colours. For the CIFAR-10 VP model the tuned setting was Schurn=30S_{\text{churn}} = 30 at N=192N = 192 steps, which gives γ=0.156\gamma = 0.156, t^=1.156 t\hat t = 1.156\, t, and new noise of standard deviation 0.58 t0.58\, t at every step inside [0.01,1][0.01, 1]. For the pre-trained ImageNet-64 model it was Schurn=80S_{\text{churn}} = 80 at N=256N = 256, so γ=0.31\gamma = 0.31 and new noise of 0.85 t0.85\, t per step inside [0.05,50][0.05, 50].

Figure 5 · Algorithm 2, step by step
401.000
Left: noise level against step, N=18N = 18. Each amber segment is the climb from tit_i to t^i\hat t_i, each teal segment the Heun step down to ti+1t_{i+1}. Right: one sample path from the same seed. Drag SchurnS_{\text{churn}} from 0 (pure ODE) to 100 (clamped at γ = 0.414 from Schurn=7.5S_{\text{churn}} = 7.5 upward); toggle the noise-level range; nudge SnoiseS_{\text{noise}} to see how little it changes the injected amplitude.

Figures 6 and 7 hold the paper's measurements. With all four constants tuned by grid search per model (the table in Appendix E.2), stochastic sampling brings the VP model from FID 2.93 to 2.27, VE from 3.73 to 2.23, and the pre-trained ImageNet-64 model from 2.64 to 1.55, against the model's own published 2.07. At the time, 1.48 (cascaded diffusion), 1.55 (classifier-free guidance) and 1.52 (StyleGAN-XL) were the best reported ImageNet-64 numbers. Figure 7 shows the shape behind the tuning: FID falls with SchurnS_{\text{churn}} up to a model-specific optimum and rises past it, and each of the two refinements, SnoiseS_{\text{noise}} and the level range, moves the whole curve down.

Figure 6 · FID against network evaluations, stochastic sampling
The paper's Fig. 4 data. Grey is the deterministic Heun baseline; pink is the model's original stochastic sampler; violet, blue, amber and teal add churn, then SnoiseS_{\text{noise}}, then the level range, then both. Stochastic sampling needs more evaluations to converge than the ODE, and reaches lower FID once it does.
Figure 7 · FID against the churn budget at fixed NFE
The paper's Fig. 15 data, every model at N = 256 (511 NFE). Every curve has a minimum: too little churn leaves errors uncorrected, too much degrades the image. With both corrections on (teal) the minimum is deepest. The paper adopts SchurnS_{\text{churn}} of 30 for VP and 80 for VE and ImageNet-64 (Appendix E.2); in this sweep the VE and ImageNet curves are flat within the paper's ±2% FID noise from about 60 upward.

The paper is explicit about the cost. The four constants had to be found by grid search separately for each model, and they encode properties of that model's errors, so a paper that evaluates architecture changes with a stochastic sampler is also, in part, evaluating how well the churn heuristics happen to suit each architecture. The section on training returns to this: once the network is trained with the recipe below, the benefit of churn shrinks and, on CIFAR-10, disappears.

Preconditioning the network

A network trained to output D(x;σ)D(\mathbf{x}; \sigma) directly would face inputs whose magnitude ranges from 0.5 at low noise to 80 at high noise, and would have to produce outputs of magnitude 0.5 from both. Every method therefore wraps a raw network FθF_\theta in fixed scalings. The VP and DDPM families divide the input by σ2+1\sqrt{\sigma^2 + 1} (VE leaves it unscaled; for VP this is exactly its s(t)s(t)), have FθF_\theta predict the noise scaled to unit variance, and reconstruct D=x−σFθD = \mathbf{x} - \sigma F_\theta. At σ=80\sigma = 80 that reconstruction multiplies every error the network makes by 80, and requires the network to reproduce a noise pattern of amplitude 80 to within a fraction of the 0.5-amplitude signal it hides. Predicting the signal would be easier there, but predicting the noise is easier at low σ\sigma, where the signal is nearly the input. EDM lets the wrapper choose per noise level, through a skip connection:

Dθ(x;σ)=cskip(σ) x+cout(σ) Fθ(cin(σ) x;  cnoise(σ))D_\theta(\mathbf{x}; \sigma) = c_{\text{skip}}(\sigma)\, \mathbf{x} + c_{\text{out}}(\sigma)\, F_\theta\big( c_{\text{in}}(\sigma)\, \mathbf{x};\; c_{\text{noise}}(\sigma) \big)
(7)

Substituting (7) into the loss (2), weighted by λ(σ)\lambda(\sigma) and averaged over noise levels drawn from a training distribution ptrain(σ)p_{\text{train}}(\sigma), and collecting terms shows what FθF_\theta is being trained to output:

Eσ,y,n[λ(σ) cout(σ)2⏟effective weight∥Fθ(cin(σ)(y+n);cnoise(σ))−1cout(σ)(y−cskip(σ)(y+n))⏟effective target∥22]\mathbb{E}_{\sigma, \mathbf{y}, \mathbf{n}} \Big[ \underbrace{\lambda(\sigma)\, c_{\text{out}}(\sigma)^2}_{\text{effective weight}} \Big\lVert F_\theta\big( c_{\text{in}}(\sigma)(\mathbf{y} + \mathbf{n}); c_{\text{noise}}(\sigma) \big) - \underbrace{\tfrac{1}{c_{\text{out}}(\sigma)} \big( \mathbf{y} - c_{\text{skip}}(\sigma)(\mathbf{y} + \mathbf{n}) \big)}_{\text{effective target}} \Big\rVert_2^2 \Big]Eσ,y,n[λ(σ) cout(σ)2⏟effective weight∥Fθ(cin(σ)(y+n);cnoise(σ))−1cout(σ)(y−cskip(σ)(y+n))⏟effective target∥22]\begin{aligned} \mathbb{E}_{\sigma, \mathbf{y}, \mathbf{n}} \Big[ &\underbrace{\lambda(\sigma)\, c_{\text{out}}(\sigma)^2}_{\text{effective weight}} \Big\lVert F_\theta\big( c_{\text{in}}(\sigma)(\mathbf{y} + \mathbf{n}); c_{\text{noise}}(\sigma) \big) \\ &- \underbrace{\tfrac{1}{c_{\text{out}}(\sigma)} \big( \mathbf{y} - c_{\text{skip}}(\sigma)(\mathbf{y} + \mathbf{n}) \big)}_{\text{effective target}} \Big\rVert_2^2 \Big] \end{aligned}
(8)

Four requirements then fix the four functions, in the paper's Appendix B.6. The input to FθF_\theta should have unit variance; since y+n\mathbf{y} + \mathbf{n} has variance σdata2+σ2\sigma_{\text{data}}^2 + \sigma^2, this gives cin=1/σ2+σdata2c_{\text{in}} = 1/\sqrt{\sigma^2 + \sigma_{\text{data}}^2}. The target should have unit variance, which sets cout2=(1−cskip)2σdata2+cskip2σ2c_{\text{out}}^2 = (1 - c_{\text{skip}})^2 \sigma_{\text{data}}^2 + c_{\text{skip}}^2 \sigma^2, the variance of the numerator of the target. The network's errors are multiplied by coutc_{\text{out}} on the way to DθD_\theta, so choose cskipc_{\text{skip}} to make coutc_{\text{out}} as small as possible: setting the derivative of that quadratic to zero gives cskip=σdata2/(σ2+σdata2)c_{\text{skip}} = \sigma_{\text{data}}^2 / (\sigma^2 + \sigma_{\text{data}}^2), and substituting back, cout=σσdata/σ2+σdata2c_{\text{out}} = \sigma \sigma_{\text{data}} / \sqrt{\sigma^2 + \sigma_{\text{data}}^2}. The fourth, cnoise=14ln⁡σc_{\text{noise}} = \tfrac14 \ln \sigma, is chosen empirically; it turns a noise level between 0.002 and 80 into a conditioning scalar between −1.55 and 1.10.

The numbers at three noise levels show what the wrapper does. At σ=0.01\sigma = 0.01: cskip=0.9996c_{\text{skip}} = 0.9996, cout=0.010c_{\text{out}} = 0.010, and the target is 0.04 y−100 n0.04\,\mathbf{y} - 100\,\mathbf{n}, whose variance is entirely noise, so FθF_\theta is a noise predictor and its output is scaled down by 100 before it touches the input. At σ=0.3\sigma = 0.3, the median training level: cskip=0.735c_{\text{skip}} = 0.735, cout=0.257c_{\text{out}} = 0.257, cin=1.715c_{\text{in}} = 1.715, and the target is 1.03 y−2.86 n1.03\,\mathbf{y} - 2.86\,\mathbf{n}, 27% signal variance and 73% noise. At σ=10\sigma = 10: cskip=0.0025c_{\text{skip}} = 0.0025, cout=0.499c_{\text{out}} = 0.499, and the target is 2.0 y−0.005 n2.0\,\mathbf{y} - 0.005\,\mathbf{n}, 99.8% signal, so FθF_\theta predicts the clean image scaled to unit variance and the skip contributes nothing. The crossover, where the target is half signal and half noise, is at σ=σdata=0.5\sigma = \sigma_{\text{data}} = 0.5, where cskip=1/2c_{\text{skip}} = 1/2.

Figure 8 · the four preconditioning functions and what F is asked to predict
0.50
Top: cskipc_{\text{skip}} (teal), cout/σdatac_{\text{out}}/\sigma_{\text{data}} (amber) and cin⋅σdatac_{\text{in}} \cdot \sigma_{\text{data}} (violet) over the noise level. Bottom: the share of the effective target's variance that is signal (amber) against noise (teal). Hover to read all four functions, λ, and the split at any σ; drag σdata\sigma_{\text{data}} to move the crossover.

On its own this change leaves CIFAR-10 FID roughly where it was: config D in the table below moves it by between −0.02 and +0.27. Its effect shows on the 64×64 VE model, whose FID goes from 41.62 to 3.39 on FFHQ and from 15.04 to 3.81 on AFHQv2, and in the authors' report that training became robust enough to redesign the loss without destabilising it.

Which noise levels to train on

Equation (8) says the raw network sees an effective weight of λ(σ)cout(σ)2\lambda(\sigma) c_{\text{out}}(\sigma)^2 per sample. The paper sets

λ(σ)=1cout(σ)2=σ2+σdata2(σ σdata)2\lambda(\sigma) = \frac{1}{c_{\text{out}}(\sigma)^2} = \frac{\sigma^2 + \sigma_{\text{data}}^2}{(\sigma\, \sigma_{\text{data}})^2}

so that every noise level carries weight 1. The output layer of FθF_\theta is initialised to zero, so at the start of training Dθ=cskipxD_\theta = c_{\text{skip}}\mathbf{x} and the expected loss at every σ\sigma is exactly 1 (Appendix B.6 works the algebra; the grey curve in Figure 9 is the measurement). With the earlier weighting λ=1/σ2\lambda = 1/\sigma^2 the initial loss would vary by orders of magnitude across the range and the gradient would be dominated by whichever levels happened to be loudest.

Where should training draw its noise levels from? The trained loss curves answer it. On CIFAR-10 the loss after training is still 0.94 at σ=0.001\sigma = 0.001 and 0.52 at 0.01: the noise is so small that separating it from the image is both hard and, for generation, pointless. At the other end it is 0.67 at 10, 0.92 at 30 and 0.99 at 100: the correct answer is close to the dataset mean and the target, one particular training image, is always far from it. In between it falls below 0.35 for σ\sigma from 0.03 to 3 and bottoms out at 0.10 near σ=0.44\sigma = 0.44 (0.07 near 0.49 on FFHQ). Training can only reduce the loss in that band, and the paper concentrates the training samples there with a log-normal distribution: ln⁡σ∼N(Pmean,Pstd2)\ln \sigma \sim \mathcal{N}(P_{\text{mean}}, P_{\text{std}}^2) with Pmean=−1.2P_{\text{mean}} = -1.2 and Pstd=1.2P_{\text{std}} = 1.2. Its median is e−1.2=0.30e^{-1.2} = 0.30, 66% of the draws land in [0.1,1][0.1, 1], 6.7% below 0.05, and 16% above 1; a draw above 80 or below 0.002 happens about once in sixty thousand samples.

Figure 9 · the per-level loss and the training distribution
-1.21.2
The paper's Fig. 5a. Grey: loss at initialisation, flat at 1 as the weighting predicts. Teal and violet: the loss after training on CIFAR-10 and FFHQ-64, lowest near σ = 0.45 and below 0.35 from σ = 0.03 to 3. The amber curve is ptrain(σ)p_{\text{train}}(\sigma), drawn as a density on the log axis. Drag PmeanP_{\text{mean}} and PstdP_{\text{std}}; the readout gives the median and the mass in three bands.

A training step draws a noise level per image from the log-normal, adds noise at that level, runs the wrapped network, weights the squared error, and back-propagates into FθF_\theta only; the four cc functions are fixed formulas with no parameters:

# one EDM training step (training/loss.py, EDMLoss); CIFAR-10, batch of 4
y     = batch                              # clean images [4, 3, 32, 32] in [-1, 1]
ln_s  = -1.2 + 1.2 * randn(4)              # ln(sigma) ~ N(P_mean, P_std^2)
sigma = exp(ln_s).view(4, 1, 1, 1)         # e.g. [0.30, 0.05, 1.9, 0.11]
n     = sigma * randn_like(y)              # noise at each sample's own level
D     = precond(F, y + n, sigma)           # Eq. (7): c_skip*x + c_out*F(...)
lam   = (sigma**2 + 0.25) / (0.5 * sigma)**2   # lambda = 1 / c_out^2
loss  = (lam * (D - y)**2).mean()          # Eq. (2) weighted; grad reaches F only

For the batch in the listing the four noise levels 0.30, 0.05, 1.9 and 0.11 get weights 15.1, 404, 4.3 and 86.6, and the four targets handed to FθF_\theta range from 99% noise variance (at 0.05) to 94% signal (at 1.9). Config E in the table is this loss on top of config D, and on CIFAR-10 it is the largest of the paper's own three training changes (configs D, E, F): CIFAR-10 unconditional VP goes from 2.29 to 2.05, VE from 3.10 to 1.99. On the 64×64 VE models config D is larger (FFHQ 41.62 to 3.39, AFHQv2 15.04 to 3.81). Concurrent work by Choi et al. changed only λ\lambda and found a smaller gain; the paper attributes the difference to changing the weight and the sampling distribution together.

The last training change borrows from GANs. Diffusion models on small datasets overfit, so the paper applies the geometric augmentations of the ADA pipeline (adaptive discriminator augmentation, from StyleGAN2-ADA): flips, rotations, scalings and translations applied to each training image before adding noise. To keep the augmentations out of the generated images, the augmentation parameters are fed to FθF_\theta as a nine-dimensional conditioning vector, and set to zero at sampling time, so the network learns to generate un-augmented images on request. Config F adds this and reaches the final numbers. The full ladder, evaluated with the 35-evaluation (79 at 64×64) deterministic sampler:

FID, Table 4CIFAR-10 cond. VPVECIFAR-10 uncond. VPVEFFHQ-64 VPVEAFHQv2-64 VPVE
A baseline (Song et al.)2.483.113.013.773.3925.952.5818.52
B + adjusted hyperparameters2.182.482.512.943.1322.532.4323.12
C + redistributed capacity2.082.522.312.832.7841.622.5415.04
D + EDM preconditioning2.092.642.293.102.943.392.793.81
E + EDM loss (λ, p_train)1.881.862.051.992.602.812.292.28
F + non-leaky augmentation1.791.791.971.982.392.531.962.16

Configs B and C are hyperparameter changes: batch size 512 at 32×32 (256 at 64×64) instead of 128, on 8 GPUs instead of 4, learning rate 0.001 for CIFAR-10 (unchanged at 0.0002 for the 64×64 sets) with a 10-million-image warm-up, no gradient clipping, an exponential moving average of the weights with a half-life of 0.5 million images, dropout tuned per dataset, and the 4×4 resolution layers removed with the 16×16 layers doubled in width, for about 56 million parameters at 32×32. Each CIFAR-10 model trains for 200 million images, about 400,000 iterations, in roughly two days. By config F the VP and VE columns differ only in the network architecture, DDPM++ against NCSN++, and their FIDs agree to within 0.01.

What the recipe buys

The headline numbers are FID 1.79 on class-conditional CIFAR-10 and 1.97 unconditional, against the previous records of 1.85 (StyleGAN-XL) and 2.10, with 35 network evaluations and deterministic sampling. For ImageNet-64 the authors trained the unchanged ADM architecture from Dhariwal and Nichol, about 296 million parameters, with config E for two weeks on 32 GPUs at batch 4096, and reached FID 1.36 against the previous 1.48. Neither number used guidance or a separate super-resolution stage.

The two halves of the paper interact. On the pre-trained models, stochastic sampling was worth 0.7 to 1.5 FID points. On the retrained CIFAR-10 models, the best result came from the deterministic sampler and every amount of churn made FID worse; the retrained ImageNet-64 model still gained from churn, but its optimum moved from Schurn=80S_{\text{churn}} = 80 to 40 and the gain shrank. The paper's reading is that churn corrects the denoiser's errors, so a better-trained denoiser leaves less to correct, and that more diverse datasets keep benefiting for longer. The interaction between the training objective and stochastic sampling is left open.

The limitations the authors state: the churn constants are heuristics found by grid search per model; the degradation they guard against is not understood beyond the hypothesis that the learned denoiser induces a field that is not the gradient of any density (a non-conservative field); the parameter values were tuned at 32×32 and 64×64 and may need re-tuning at higher resolution, where current systems add super-resolution stages, latent spaces or much larger networks on top; and the project consumed about 250 MWh on V100s. Later systems, from rCM distillation to DiffusionBlocks, state their design in the rows of the paper's Table 1: a σ(t)=t\sigma(t) = t schedule, the ρ\rho spacing, the four cc functions with σdata=0.5\sigma_{\text{data}} = 0.5, and a log-normal over training noise levels.

Provenance Verified against primary literatureHow we verify
Karras et al. (2022)Eqs. (1)-(8), Algorithms 1-2, Tables 1-4 and the derivations in Appendix B (ODE, SDE, denoiser, preconditioning) and D (truncation error, rho) read from the arXiv v2 source.
NVlabs/edm codetraining/networks.py EDMPrecond.forward lines 660-667 (the four c functions), training/loss.py EDMLoss lines 73-79 (log-normal sigma, weight, loss), generate.py edm_sampler lines 34-58 (rho steps, churn, Heun with Euler on the last step).
Song et al. (2021)Score SDE: the VP and VE forward SDEs, the reverse-time SDE and the probability-flow ODE that EDM reparameterises.
Ho et al. (2020); Nichol & Dhariwal (2021); Song et al. (2020)DDPM, iDDPM and DDIM: the discrete-time family that becomes the third column of Table 1.
Hyvärinen (2005); Vincent (2011)Score matching and its denoising form; the finite-dataset closed form of the ideal denoiser is worked in the paper's Appendix B.3.
Anderson (1982)Time reversal of an SDE; the reverse SDE of Eq. (6) flips the sign of the Langevin decay term only.
Jolicoeur-Martineau et al. (2021)Earlier use of Heun's method for diffusion sampling, with an adaptive SDE solver that Fig. 6 compares against.
Karras et al. (2020)The non-leaking augmentation pipeline (ADA) reused for config F.
correctionThe popular summary "EDM makes the network predict the clean image instead of the noise" is wrong on a checkable point. Eq. (8) gives the raw network F a sigma-dependent target, (y - c_skip (y + n)) / c_out: at sigma = 0.01 its variance is 100% noise, at sigma = 10 it is 99.8% signal, and it is half and half at sigma = sigma_data = 0.5. Two smaller points: rho = 7 is not the spacing that minimises truncation error (the paper's own Appendix D.1 finds rho = 3 nearly equalises it; 7 is chosen for FID), and the 35 NFE of the CIFAR-10 result is 18 Heun steps at 2N - 1 evaluations, because the last step to sigma = 0 is a plain Euler step.

Questions you might still have

?

Why does the ODE step use (x − D)/t rather than the score?
They are the same thing written twice. Eq. (3) says the score is (D − x)/σ², and Eq. (1) multiplies the score by −σ̇σ; with σ(t) = t that product is −t, so the velocity is (x − D)/t. Writing the step through D lets the sampler treat any network as a plain denoiser, whatever quantity the network was trained to output.

?

If the ODE and the SDE produce the same distribution, why does stochastic sampling help at all?
They produce the same distribution only when D is exact and the steps are infinitesimal. A real sampler takes finite steps with an imperfect denoiser, and each step leaves the sample slightly off the correct marginal. The Langevin term in Eq. (6) keeps pulling samples back toward the correct marginal at every noise level, so it undoes some of the accumulated error. It also adds its own discretisation error and, with a non-conservative learned D, a slow drift, which is why the paper grid-searches how much to use.

?

Can I run this sampler on a DDPM I already trained?
Yes; that is what Section 3 of the paper does with three pre-trained models. Table 1 says what to plug in: c_noise turns a sigma into the timestep index the network expects, c_in and c_out match its input and output scaling, and a network trained on a discrete set of noise levels needs each t_i rounded to the nearest level it saw. The DDPM explainer on this site covers the discrete-time side of that mapping.

?

Is sigma_data = 0.5 measured from the data?
It is a design constant. Images are scaled to [−1, 1] and 0.5 is a round estimate of a pixel's standard deviation; the code exposes it as a parameter with that default. The derivation in Appendix B.6 only needs the number to be roughly right, because it sets the crossover where c_skip = 1/2 and normalises the training target to unit variance.

?

Why a log-normal over sigma and not uniform in log sigma?
Uniform in log sigma over [0.02, 100] is the VE choice in Table 1 and it spends equal effort on every decade, including sigma below 0.02 where the loss cannot be reduced and sigma above 10 where the target is the dataset mean. The log-normal with P_mean = −1.2 and P_std = 1.2 puts 66% of the draws in [0.1, 1] and its median at 0.30, the band where the trained loss curves in Figure 9 still have room to fall.

?

Is Heun always better than Euler at the same number of network evaluations?
Not at the very lowest budgets. In the paper's Fig. 2 data, with the same VP schedule, the model at 8 evaluations has FID 156 under Euler and 287 under Heun at 7, because Heun spends two evaluations per step and gets only four steps; at 15 to 16 evaluations Euler is still ahead (43.6 against 70.6). From about 20 evaluations upward Heun is ahead on both the VP and the ImageNet-64 model, and with the sigma(t) = t schedule as well it is within 0.15 FID at 35 evaluations of what Euler reaches at 512.

?

What does 35 NFE cost in wall-clock time?
The paper reports 26.3 CIFAR-10 images per second on one V100 with the 35-evaluation deterministic sampler. The 79-evaluation setting used at 64×64 is roughly 2.3 times slower per image before accounting for the larger network.

?

What breaks if S_churn is pushed too high?
Detail washes out and colours oversaturate; the paper's Appendix E.1 shows it on CIFAR-10 and ImageNet by iterating add-noise-then-denoise thousands of times at a fixed level. The authors attribute it to the learned denoiser inducing a slightly non-conservative field, in particular removing a little too much noise, which is what S_noise slightly above 1 compensates for. An analytic denoiser on the same data does not degrade.

Footnotes & further reading

  1. The paper: Karras, Aittala, Aila, Laine, Elucidating the Design Space of Diffusion-Based Generative Models (NVIDIA, NeurIPS 2022). Code and pre-trained models; the sampler is edm_sampler in generate.py, the wrapper is EDMPrecond in training/networks.py, the loss is EDMLoss in training/loss.py.
  2. The VP and VE formulations, the reverse-time SDE and the probability-flow ODE: Song, Sohl-Dickstein, Kingma, Kumar, Ermon, Poole, Score-Based Generative Modeling through Stochastic Differential Equations (arXiv:2011.13456, ICLR 2021).
  3. The discrete-time family: Ho, Jain, Abbeel, Denoising Diffusion Probabilistic Models (arXiv:2006.11239); Nichol and Dhariwal, Improved Denoising Diffusion Probabilistic Models; Song, Meng, Ermon, Denoising Diffusion Implicit Models (arXiv:2010.02502).
  4. Score matching and its denoising form: Hyvärinen, Estimation of Non-Normalized Statistical Models by Score Matching (JMLR 2005); Vincent, A Connection Between Score Matching and Denoising Autoencoders (2011).
  5. Heun's method for diffusion sampling before EDM, with an adaptive SDE solver: Jolicoeur-Martineau, Li, Piché-Taillefer, Kachman, Mitliagkas, Gotta Go Fast When Generating Data with Score-Based Models (2021). The solver background is Süli and Mayers, An Introduction to Numerical Analysis (2003).
  6. The ImageNet-64 model whose sampler is swapped: Dhariwal and Nichol, Diffusion Models Beat GANs on Image Synthesis (arXiv:2105.05233). The augmentation pipeline: Karras, Aittala, Hellsten, Laine, Lehtinen, Aila, Training Generative Adversarial Networks with Limited Data (2020).
  7. The concurrent loss-weighting work the paper compares against: Choi, Lee, Shin, Kim, Kim, Yoon, Perception Prioritized Training of Diffusion Models (CVPR 2022).