Image DDIM #
The image API stores one cumulative coefficient per noisy state. Its index zero is the first
noisy state, while VPSchedule reserves state zero for the clean sample. Reading the coefficient
table directly preserves loaded schedules, including a zero coefficient; no division is needed
to recover per-step beta values.
Image sampling also makes two numerical choices: floor the reconstruction denominator, then
clip the reconstructed sample to [-1, 1]. These operations belong to this sampler's formula.
The separate ddimStep specification retains its additive epsilon and unclipped reconstruction.
The cumulative coefficients of the noisy states, excluding the initial clean coefficient.
Instances For
Entry index describes spec state index + 1.
Read a noisy-state coefficient table using the spec's clean-state indexing.
State zero has coefficient one; state index + 1 reads table entry index. This also defines
the sole coefficient of an empty schedule without trying to index its empty table.
Instances For
The clean state precedes every entry of the stored noisy-state table.
Noisy state index + 1 uses table entry index.
Dropping and restoring the clean coefficient preserves every VP schedule state.
Time conditioning used by the image API.
The first noisy state has time zero and the last has time one when there are at least two states. A single noisy state has time zero. The state index stays explicit, so this convention never requires recovering an integer index from a rounded scalar time.
Instances For
One image DDIM update from an already evaluated epsilon prediction.
First reconstruct with 1 / max(sqrt(alphaBar), denominatorFloor), using the explicit comparison
below to match the executable branch. Clamp that reconstruction to [-1, 1], then remix it with
the same epsilon prediction at the previous coefficient. The caller chooses a positive floor;
the image API uses 1e-12. Clipping does not recompute epsilon.
Instances For
Evaluate epsilon once at the noisy-state index, then move to the preceding state.
Instances For
Reverse every noisy state, ending at the clean coefficient one.