Skip to content

Keep DDIM sampling grids within the training schedule and reach the clean boundary - #324

Open
Afloat16 wants to merge 1 commit into
labmlai:masterfrom
Afloat16:fix-ddim-sampling-grid-boundary
Open

Afloat16 wants to merge 1 commit into
labmlai:masterfrom
Afloat16:fix-ddim-sampling-grid-boundary

Conversation

@Afloat16

@Afloat16 Afloat16 commented Oct 6, 2026

Copy link
Copy Markdown

DDIM timestep construction can exceed the training schedule or produce more evaluations than requested (for example, 333 or 128 steps out of 1,000). The first transition also retains a non-unit previous cumulative alpha, leaving residual noise at the intended clean-data boundary.

Use a bounded grid of exactly the requested number of levels, validate the step count and set the final predecessor alpha to one. A one-step sampler starts at the terminal training level. The correction changes the shifted default grid and deterministic seeded outputs.

Fifty regressions cover uniform/quadratic grids, Gaussian DDIM transition formulas, invalid counts and an exactly solvable denoising trajectory through the genuine LatentDiffusion wrapper. Validated with the complete genuine package on Python 3.12.10 / Torch 2.14.1 CPU / labml 0.4.168: the same 50 frozen regressions change from 38 failures and 12 passes to 50 passes, without skips or collection errors. The recorded upstream HEAD has no formal tracked unit-test suite; no pretrained encoder, image-quality or CUDA result is claimed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant