No jobs
Core 11 min 3 of 4

ε, x₀ or v

Three exact coordinate systems for one quantity. Choosing one chooses a loss weighting across the schedule, and nothing else.

What this repairs

Treating the prediction target as an implementation detail, when it changes the loss weighting across timesteps and is why SD2.1 is not SD1.5.

Three quantities are on offer as the thing a network should output: the noise ε\varepsilon , the clean image x0x_0 , or the velocity vv . They are usually introduced as three ideas that happen to be related, which makes the choice between them look empirical.

It is not. Given xtx_t and tt , any one of the three determines the other two exactly, with no approximation and no information lost. They are one quantity written in three coordinate systems, and the coordinate change is a rotation.

The rotation

  1. c=αˉt,s=1αˉt,c2+s2=1c = \sqrt{\bar{\alpha}_t}, \qquad s = \sqrt{1-\bar{\alpha}_t}, \qquad c^2 + s^2 = 1

    The variance-preserving identity from the first concept, given names. Two non-negative numbers whose squares sum to one are a cosine and a sine, so there is an angle here whether or not anyone mentions it.

  2. xt=cx0+sε,v  =def  cεsx0x_t = c\,x_0 + s\,\varepsilon, \qquad v \;\overset{\text{def}}{=}\; c\,\varepsilon - s\,x_0

    The forward process, and the definition of velocity. The second line is not derived from anything — it is a definition, chosen so that the pair below comes out orthogonal.

  3. (xtv)=(cssc)(x0ε)\begin{pmatrix} x_t \\ v \end{pmatrix} = \begin{pmatrix} c & s \\ -s & c \end{pmatrix} \begin{pmatrix} x_0 \\ \varepsilon \end{pmatrix}

    Stack the two lines. Because c² + s² = 1 this matrix is a rotation — orthogonal, determinant one — which means it preserves lengths and is invertible everywhere on the chain.

  4. (x0ε)=(cssc)(xtv)\begin{pmatrix} x_0 \\ \varepsilon \end{pmatrix} = \begin{pmatrix} c & -s \\ s & c \end{pmatrix} \begin{pmatrix} x_t \\ v \end{pmatrix}

    A rotation inverts by transposing. So x₀ = c·x_t − s·v and ε = s·x_t + c·v: two multiply-adds, no division, and no timestep at which either is ill-conditioned.

  5. x^0=xtsε^c,c=0.0683 at t=999 (textbook)\hat{x}_0 = \frac{x_t - s\,\hat{\varepsilon}}{c}, \qquad c = 0.0683 \text{ at } t = 999 \text{ (textbook)}

    The same recovery from an ε estimate instead, and the contrast is the whole practical argument. Going through ε divides by √ᾱ, which on the textbook curve is 0.068 at the end of the chain, so whatever error the network made comes out fifteen times larger. On the rescaled curve the model actually ships, √ᾱ at t = 999 is exactly zero and the division does not exist at all — which the pitfall below is about.

Why v is never approximately anything

  1. v=cεsx0v = c\,\varepsilon - s\,x_0

    The definition again, to be read as a sum of two terms rather than as an approximation of either. Both terms are always present; only their coefficients move.

  2. αˉ1    c1, s0    vε\bar{\alpha} \to 1 \;\Longrightarrow\; c \to 1,\ s \to 0 \;\Longrightarrow\; v \to \varepsilon

    At the clean end the sine vanishes and v is the noise exactly. This is the regime where predicting the image is nearly hopeless, because there is almost none of it missing to predict.

  3. αˉ0    c0, s1    vx0\bar{\alpha} \to 0 \;\Longrightarrow\; c \to 0,\ s \to 1 \;\Longrightarrow\; v \to -x_0

    At the noisy end the verdict flips exactly: v is the negated image. This is the regime where predicting the noise is hopeless, because the input has become the noise, and copying the input scores perfectly.

  4. αˉ=12    v=12(εx0)\bar{\alpha} = \tfrac{1}{2} \;\Longrightarrow\; v = \tfrac{1}{\sqrt{2}}\left(\varepsilon - x_0\right)

    And the crossover, where the two are weighted equally, is exactly ᾱ = ½ — which is SNR = 1, which is t = 354 on the textbook curve and t = 337 on the rescaled one the model trains on. The one number in this topic a reader will not believe until they compute it turns out to be the hinge of the target choice as well, on whichever curve they compute it.

This is the concrete difference between SD1.5 and SD2.1. Both are latent diffusion models with nearly the same UNet; SD1.5 was trained against ε\varepsilon and SD2.1 against vv , and the joint model here inherits the latter — prediction_type: "v_prediction" is the class default and what the shipped config asks for.

The practical consequence is unpleasant, and it is why the field treats this as a convention rather than a detail: a checkpoint's prediction type is not recoverable from its weights. Load vv -trained weights into a pipeline configured for ε\varepsilon and nothing raises. The sampler computes x^0=(xtsε^)/c\hat{x}_0 = (x_t - s\,\hat{\varepsilon})/c on an output that is really vv , and what it gets is

x^0=15.58x0+13.62εat t=999 on the textbook curve,\hat{x}_0 = 15.58\,x_0 + 13.62\,\varepsilon \quad \text{at } t = 999 \text{ on the textbook curve,}

falling to 2.37x0+0.76ε2.37\,x_0 + 0.76\,\varepsilon at t=499t = 499 and to x0x_0 itself by t0t \approx 0 . The error is largest at the start of sampling and vanishes at the end, so the output is not noise — it is a structured, over-saturated, clipped image that looks like a model with a bad prompt rather than a model with a misconfigured target. That is the failure mode worth recognising by sight.

On the shipped curve that first line is not finite at all: cc is exactly zero at t=999t = 999 , so the division does not exist, and trailing spacing makes that the first timestep the sampler visits. The rescale turns a silent misconfiguration into a loud one, which is the rare case of a numerical degeneracy being the friendlier behaviour.

Check yourself

If ε, x₀ and v carry exactly the same information, why does swapping the target change what the trained model is good at?

Show answer

Because the loss is not invariant under the coordinate change even though the information is. Squared error in vv -space is squared error in ε\varepsilon -space multiplied by 1/αˉt1/\bar{\alpha}_t , which on the textbook curve runs from 1.00091.0009 to 214.6214.6 across the chain, and on the shipped one runs from 1.00091.0009 to unbounded. The optimiser sees a different trade between timesteps and allocates capacity accordingly.

Two things follow. First, the target is a weighting scheme in disguise, so arguing about it in terms of accuracy is arguing about the wrong axis. Second, if you wanted an ε\varepsilon model to behave like a vv model, you would not have to change the architecture — you would have to change the per-timestep loss weight to 1/αˉt1/\bar{\alpha}_t , which is a one-line change that most codebases do not expose.

Euler View - ML Experiment Monitor