Every latent-diffusion implementation multiplies by after encoding and divides by it before decoding, and almost none of them say why. It is not a tuning constant and it was not searched for. It is a measurement:
where is the component-wise standard deviation of the raw latents this autoencoder produces on its training data. The factor exists to put the latents at roughly unit variance, and the reason that matters is the previous topic's first formula.
What an unscaled latent does to the schedule
-
The forward process, unchanged. The noise term has unit variance by definition — that is not negotiable, it is what ε means — so the balance between the two terms is decided entirely by the scale of x₀.
-
Feed in data of standard deviation σ instead of 1 and every signal-to-noise ratio on the schedule is multiplied by σ². The schedule was designed against the left-hand side and is being handed the right-hand one.
-
And that factor is thirty. Not a rounding matter: the noise level the schedule believes it is applying at any timestep is thirty times more destructive than the one the data actually experiences.
-
Which moves the halfway point of the noise from t = 354 to t = 816 on the textbook curve, and from t = 337 to t = 752 on the rescaled curve the model actually trains on — the ᾱ threshold is the same 0.0321 either way, and only the timestep that reaches it moves. Four fifths of the training chain would sit in the high-signal regime, the model would almost never see genuinely destroyed data, and its first sampler steps — which start from pure noise — would be the ones it had least practice at.
-
One multiply, and the schedule means what it says again. The constant is not about the decoder, the encoder or the image — it is about making the second argument of the forward process the size the first argument assumes.
Your decoded images all come out high-contrast and clipped, and the effect is identical at 5 steps and at 100. Diffusion problem or convention problem?
Show answer
Convention, and the step-count invariance is what says so. Anything wrong with the sampler or the model changes when you change the integration; a scale error between the latent and the decoder is applied once at the end and does not.
Confirm it without touching the model. Take a real image, encode it, decode it immediately, and see whether the round trip is clipped too — if it is, the bug is in your encode/decode plumbing rather than anywhere near diffusion. Then check the arithmetic directly: measure the standard deviation of the tensor you are handing the decoder. Scaled latents run around ; if you are seeing something near , you skipped the division.