This repository was archived by the owner on Oct 4, 2026. It is now read-only.
Repository navigation
feat(ltx2): choose LTX-2.5 clip length with the duration head - #367
Merged
Merged
Conversation
Adds the LTX-2.5 duration head as a model type (gated starter), an ltx2_duration node, and an Auto duration switch in the Video panel where Frames becomes the ceiling the head chooses beneath. Recall restores the realised length and turns Auto off; the head's num_frames feeds both passes.
lstein
requested review from
JPPhoto,
Pfannkuchensack and
blessedcoolant
as code owners
September 29, 2026 01:47
lstein
enabled auto-merge
September 29, 2026 01:48
3 of 7 tasks
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
LTX-2.5 ships with a small duration head that reads the encoded prompt and predicts how long the shot it describes should run. This lets a generation choose its own length.
ltx2_duration_head, with an optional 3.6 MB starter, LTX-2.5 Duration Head.Lightricks/LTX-2.5-Diffusersrepo, not in the ungated mirror the other LTX-2.5 starters use. It is therefore its own record rather than a role in the components folder, and the starter description says it needs a token whose account has accepted the license.ltx2_durationnode. It reads the positive prompt's post-connector embeddings, as upstream's pipeline does. It calls upstreampredict_num_framesto clamp to the given bounds and snap to the 8k+1 grid. Equal or inverted bounds are refused.num_framesfeeds the base pass, the two-stage refine pass and the recorded metadata. Last-frame keyframes use a tail-relative index, so they follow automatically.Related Issues / Discussions
PR 8 of the LTX-2.5 integration plan: automatic duration, split from the enhancer work in #352.
QA Instructions
Automated:
uv run --no-sync pytest tests/app/invocations tests/backend/model_manager/configs tests/backend/model_manager/load/test_ltx2_loader.py tests/backend/model_manager/test_ltx2_identification.py tests/backend/model_manager/test_starter_models.py tests/backend/model_manager/test_starter_models_package.py tests/app/services/model_installpnpm -C invokeai/frontend/webv2 testpnpm -C invokeai/frontend/webv2 lintpnpm -C invokeai/frontend/webv2 test:browser src/features/videopnpm -C invokeai/frontend/webv2 test:performance:architecturelint:tscopenapi.jsonandschema.tswere regenerated after merging main, with no drift.New tests:
predict_num_framescalled with the node's keywords;fpsandmax_secondsequal the Frames ceiling; the head is skipped for a short ceiling and in clip modes;VideoLengthControls: switch presence and label, Frames staying editable as "Max frames" with its range, and the disabled state in clip modes.Real file (CPU): the gated head identifies as
ltx2_duration_headand loads strictly. bf16 tokens into the fp32 head give identical output, because upstream casts them.Live app (2x AMD W7900, int8 Dev transformer, 24 fps):
Review
Material findings resolved:
Remaining limitations:
config.json, and the pooler's head count does not show in any tensor shape.ltx2_denoisedoes not cap either.Compatibility / Rollout
ltx2_duration_head: legacy web's enums and tables are updated, and the generatedopenapi.jsonandschema.tsare regenerated.Checklist
What's Newcopy (if doing a release after this PR)