Nodes/LTXDirector-Extender/LTX Extension Frame Logic
ComfyUI Node

LTX Extension Frame Logic

The math node that tells the extender sampler how long everything is

By Yogurt1192·Created 3 months ago·Updated 3 months ago· 6
LTX Extension Frame Logic
  • prepared_images
  • overlap_seconds
  • extend_frames
  • extend_seconds
  • overlap_extend_seconds
  • accumulated_duration_seconds
  • ref_audio_start_seconds
  • ref_audio_duration_seconds
  • ref_frame_at_end
  • ref_frames_tail
  • frame_count
extend_frames125
overlap_frames25
frame_rate25.000

Some nodes transform pixels. This one just does the arithmetic that keeps a multi-pass extension run from falling apart. In the LTX Director extender sampler subgraphs, every continuation pass needs a small constellation of numbers - how long the overlap is in seconds, when the reference audio should start, which frames are the "anchor" the next pass should hold onto. LTXExtensionFrameLogic computes all of it from three values you set, and hands back the reference frames too, so the subgraph has both the numbers and the pixels it needs in one shot.

How it works. Pure, transparent math from your inputs: prepared_images (the batch of prepared frames from the previous clip), extend_frames (how many new frames this pass adds, default 125), overlap_frames (how many old frames carry over, default 25), and frame_rate (default 25). From those it derives:

  • overlap_seconds and extend_seconds - the two durations in real time
  • overlap_extend_seconds - their sum, the total window this pass covers
  • accumulated_duration_seconds - the full length of the prepared footage so far
  • ref_audio_start_seconds and ref_audio_duration_seconds - where the reference audio sits (it's the overlap tail, so the next pass's audio can be conditioned on the tail rather than the whole clip)
  • ref_frame_at_end - the very last prepared frame
  • ref_frames_tail - the last overlap_frames frames as a batch, the actual pixels the continuation should continue from
  • frame_count - how many frames went in

In the v1.6 workflow these outputs feed the sampler subgraph's wiring directly. The README is explicit that this was a bug-fix target: previously the outputs were consumed through an overlap "bus" that collapsed to a one-frame cut; the corrected subgraph wiring is what makes the smoother transitions work.

Inputs and outputs that matter. For a beginner, the ones you'll actually touch are extend_frames and overlap_frames - that pair defines how much new footage each pass adds and how much of the old clip it's allowed to lean on. Everything else flows. Note overlap_frames is clamped to the number of prepared frames, and if prepared_images is empty or frame_rate isn't positive, you get a ValueError, not a silent garbage result.

Install is the pack standard:

cd ComfyUI/custom_nodes
git clone https://github.com/Yogurt1192/LTXDirector-Extender.git

Restart ComfyUI. No models, no extra dependencies.

Where people get burned. This node doesn't set the extender's duration - it reports it. If you change extend_frames here and the pass ignores you, the mismatch is in the other half of the contract: the duration set in the LTX Director Extender node and inside the sampler subgraph, which this pack requires you to keep in sync by hand. When the README says long runs exhaust system RAM near the end, this is the node whose numbers you'll be shaving down first - 10–15 second chunks are the reliable default.

CategoryLTXDirector/transition

Inputs (4)

NameTypeDefaultDescription
prepared_imagesIMAGE
extend_framesINT1250–65535
overlap_framesINT250–65535
frame_rateFLOAT25.0000.001–1000

Outputs (10)

NameTypeDescription
overlap_secondsFLOAT
extend_framesINT
extend_secondsFLOAT
overlap_extend_secondsFLOAT
accumulated_duration_secondsFLOAT
ref_audio_start_secondsFLOAT
ref_audio_duration_secondsFLOAT
ref_frame_at_endIMAGE
ref_frames_tailIMAGE
frame_countINT