The autoencoder is trained first, on images, with an objective that has nothing to do with diffusion — a reconstruction term, a perceptual term, a patch discriminator, and a KL regulariser with a deliberately tiny weight. Then it is frozen, and the diffusion model is trained against its output.
In the model this arc is built on, that freezing is not incidental — it is enforced in one line and explained in the next. The whole codec has its gradients disabled at construction; a flag can unfreeze the decoder alone, and the comment that guards the encoder gives the reason: the encoder must stay frozen so that the latent distribution the UNet consumes is stable. Train the encoder and you are moving the target distribution out from under a model that is simultaneously learning it. The shipped configuration leaves even the decoder frozen.
So the correct mental model is a codec, in the sense that JPEG is a codec: a fixed, lossy, previously-agreed representation that everything downstream is defined against.
The ceiling, stated so it can be measured
-
Every output the system can ever produce has this form: a latent from the diffusion model, pushed through the decoder. The decoder is the last thing that touches the result and it is not part of the sampling.
-
The reachable set is therefore the image of the decoder, and it does not depend on the diffusion model at all. A better sampler moves you around inside this set; it cannot leave it.
-
And the cheap probe for whether a particular image is even in range is the round trip: encode it, decode it, compare. No diffusion, no noise, no sampler — one forward pass each way.
-
The round-trip error is a floor under the error of every sample the model will ever produce of that image. This is the sentence worth carrying out of the topic: the ceiling is measurable in two lines and it is fixed before diffusion starts.
Your latent-diffusion dehazer produces output that is slightly soft no matter how many sampler steps you run. Where do you look first, and what would rule the codec in or out?
Show answer
At the codec, before touching anything about diffusion — because "no matter how many steps" is the signature of a ceiling rather than of an under-converged integration.
The test is the round trip: take the ground-truth clear image, encode it, decode it, and compare that to the model's output. If the round trip is just as soft, the diffusion model is already producing everything the decoder can express and the softness is the ceiling; more steps, a better sampler and more training are all working on the wrong stage. If the round trip is sharp and the model's output is not, the problem really is upstream and the sampler is worth investigating.
Do this before reading a metric. A per-pixel score cannot tell the two cases apart, because they produce the same number.