Repository navigation
Run the final automatic denoising step in LTX long multi-prompt - #15490
mertkayacs wants to merge 1 commit into
Conversation
|
@yaoqih @sayakpaul could one of you review this when you have time? The test covers the final step that was skipped. |
Thanks for fixing the missing step for automatically generated schedules. I confirmed that all four windows now run 8 steps and reach sigma 0 in the 361-frame LTX run. One edge case remains with explicit sigmas and FlowMatchEulerDiscreteScheduler(shift_terminal=0.1). The scheduler transforms the supplied terminal 0.0 to 0.1 and appends the actual terminal 0.0, but _prepare_timesteps decides whether to trim a timestep from the original input sigmas. As a result, each window runs 8 steps and stops at sigma ≈0.1, skipping the final 0.1 → 0 transition. The resulting video also diverges visibly from the run that executes this final step. Could you base the trimming decision on the scheduler’s processed schedule and add a regression test for this shift_terminal case? Please retain coverage for the default explicit schedule ending in 0.0 to ensure it does not run the redundant 0.0 → 0.0 step. I recommend requesting changes until this case is covered. |
What does this PR do?
The LTX long multi-prompt pipeline dropped the last scheduler timestep in every window, so each window stopped at a positive sigma. I now keep every automatic timestep and trim the final entry only when explicit sigmas end in zero.
num_timestepsmatches the loop that actually runs.Fixes #15460
I used Codex to help write, test, and self-review the change.
Verification
I also ran the full pipeline with tiny random components on HF Jobs CPU (two windows,
num_inference_steps=2). Before the fix, each window made one transformer call and ended at sigma 0.001. With the fix, each window made two calls and ended at 0.0, for both FlowMatch and the LTX ancestral RF scheduler.Final self-review (READY). I traced the window reset through the loop and
scheduler.stepand found no blocking issues or dead code. The NumPy warnings in the test come from FlowMatch's existingnp.array(sigmas)conversion. An explicit ancestral input ending above zero keeps every entry; the scheduler already warns about that case, so I left scheduler behavior out of this patch.Before submitting
self-reviewskill on the diff?Who can review?
LTX pipeline maintainers.