Repository navigation
[LTX prereq] DiT scaffold: support loops that run in successive stages - #373
Merged
Merged
Conversation
Two gaps kept a model from running the denoise node in a second stage (a draft loop, then a refinement loop in a later walk): * iteration 0 always seeded from noise through seed_loop_back, which never sees the step's inputs. The new initial_loop_back(fwd_info, inputs, bucket_key, generator) hook defaults to seed_loop_back, leaving every existing model unchanged; a refinement loop overrides it to start from the latents routed to it. * the per-request schedule and bucket key were cached on the first prepare_inputs and never rebuilt, so a second walk silently reused the first stage's shape and step count. They are now cached per (request, walk). LTX-2.5's two-stage distilled recipe is the first user. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NSagan271
marked this pull request as ready for review
October 9, 2026 07:14
dghosef
approved these changes
Oct 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Developed with the AGENTS.md / skills harness from #370.
Two gaps kept a model from running its denoise node in a second stage (a draft loop, then a refinement loop in a later walk):
seed_loop_back, which never sees the step's inputs. New hookinitial_loop_back(fwd_info, inputs, bucket_key, generator), defaulting toseed_loop_back, so every existing model is unchanged.prepare_inputsand never rebuilt, so a second walk silently reused the first stage's shape and step count. They are now cached per (request, walk).First user: LTX-2.5's two-stage recipe (#376).
Tests:
test/modular/test_diffusion_denoise_loop.py+3 (default seeding unchanged;initial_loop_backsees the inputs at iteration 0 only; a second walk gets its own shape and schedule, andcheck_stopfollows it). Withtest_flux2_klein_model.pyandtest_z_image_model.py: all pass.🤖 Generated with Claude Code