36%
Lower background LPIPS
Up to 36.0% relative to full regeneration at early branch 9. This is background distance, not an editing success rate.
Dancing Diffusion: Learning Continuous Programs
for Image Generation and Editing
Turn a generation request into continuous conditions for successive denoising stages. Save the executed state, rewrite what comes next, and resume.
01 / See the continuation
Original paper outputs · Figure 4
Target request A red truck drives down the opposite side of the road as a yellow bus and a small green car.



Final update 1423 · 6/12/12 schedule · branch 9 · seed 101.
View the full five-way paper comparison ↗Selected illustrations show scene retention alongside a requested replacement; they do not estimate success rates. Full regeneration starts from noise. The learned continuation resumes a saved generated state. Image-input controls in the full figure have different source access.
02 / The idea
Continuous condition space · frozen generator
A learned compiler assigns a continuous condition block to each span of denoising steps. The generator executes the blocks over time. Editing replaces future conditions while reusing the state already reached.
Map the request to a sequence of continuous condition blocks.
Run the frozen generator and retain a genuine intermediate sampler state.
Change the continuation and branch from the same executed history.

Watch the saved trajectory
Every saved predicted-clean readout from the observer-guided example in Figure 3, in temporal order.
Controlled sphere study, separate from SANA. All 8 archived readouts at steps 0, 20, 40, 60, 80, 100, 140 and 199 are shown. These are not all 200 sampling steps. No interpolated frames; the example was selected post hoc.
Download the GIF ↗
03 / Measured in the paper
Read the full protocols ↗36%
Up to 36.0% relative to full regeneration at early branch 9. This is background distance, not an editing success rate.
7.145
From native SANA's 7.349 on MJHQ-30K, with schedule 6/12/12 and the final checkpoint at update 1423.
22–23.4%
For four continuations with a shared prefix, versus recomputing it. Paired endpoints are identical. Native prompt switching can share this saving.
All final schedules
Same-protocol generation FID; lower is better. These are single-run, terminal-checkpoint results. Initialization histories differ across schedules.
Original paper table ↗| Configuration | Final FID ↓ | Δ vs native |
|---|---|---|
| Native SANA | 7.349 | — |
| 3/9/18 | 7.315 | −0.034 |
| 6/12/12 | 7.145 | −0.204 |
| 9/12/9 | 7.375 | +0.026 |
In a separate controlled image study, learned conditioning changes when content appears. This is distinct from the SANA experiment. Later branching can weaken edits; block interventions verify routing without establishing a training-induced semantic factorization. The method operates on saved generated states and is not a general arbitrary-photo editor.

04 / Work with the code
Research source release
The release includes the final trainer, continuous compiler, prefix capture/resume, evaluation implementations, configuration templates and CPU contract tests.
Available: source, tests, recorded tables and paper examples.
Not bundled: final weights, replay corpus and path-bound reproduction receipts.
git clone https://github.com/mistakes-glitch/declabeldiff.git
cd declabeldiff/dancing_diffusion
python -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements-cpu.txt
python scripts/verify_release.py
python examples/prefix_edit_cpu.py
python -m pytestThe tiny CPU runtime checks execution and gradient contracts. It does not generate SANA images or reproduce the paper's numerical results.
@article{cui2026dancing,
title={Dancing Diffusion: Learning Continuous Programs
for Image Generation and Editing},
author={Cui, Enhe and Yang, Jinyue and
Yin, Bojian and Li, Guoqi},
journal={arXiv preprint arXiv:2610.28003},
year={2026}
}