Nodes/IAMCCS-nodes/LTX-2 Extension Module ??
ComfyUI Node

LTX-2 Extension Module ??

The all-in-one LTX-2 extension module, knob by knob

By IAMCCS·Created 11 months ago·Updated 7 days ago· 113
LTX-2 Extension Module ??
  • source_images
  • new_images
  • source_images
  • start_images
  • extended_images
  • overlap_frames
  • calculated_frames
  • extension_frames
  • report
overlap_frames10
overlap_sidesource
overlap_modelinear_blend
enable_mathtrue
math_operationa-b
safe_modenone
start_frames_rulenone
color_match_modenone
color_match_strength1.00
color_reference_window8
seam_search_modenone
k_search0
metric_weight_color1.0
metric_weight_edges0.5
presetcustom
math_value_b1

This is the node the whole LTX-2 side of IAMCCS-nodes orbits. Long LTX-2 video means generating segment by segment and stitching - and stitching badly is how you get the flickering seams and identity drift that show up in every long-clip thread. LTX2 Extension Module is the author's attempt to make that one step good: overlap frames, blending modes, seam search, color matching, frame math, and next-pass start-frame extraction all in a single node. It's a lot. That's deliberate - this is the tuning surface, and the pack also ships a simple variant that hides most of it.

How it works

At its core it's the same stitch as the simple version: take source_images + new_images, choose overlap_frames from one side (overlap_side), blend the overlap, and hand you back extended_images plus start_images for the next pass. What the full module adds is quality tooling aimed at the two ways LTX extensions visibly fail:

  • seam_search_mode = best_of_k - instead of blending at a fixed offset, it searches inside the new chunk for the frame where the seam looks most continuous (using k_search candidate offsets and metric_weight_color / metric_weight_edges for the matching). This attacks the "odd restart" / rewind artifacts where the model re-generates slightly different frames at the join.
  • color_match_mode - matches the new chunk's color and exposure to the source tail before merging (luma_only or per_channel, strength via color_match_strength, stats window via color_reference_window). Drift in color between segments is the #1 complaint on long LTX-2 runs; this is the direct fix.
  • safe_mode = native_workflow_safe - mimics the older IAMCCS workflow behavior for start frame extraction, for drop-in compatibility with existing graphs.
  • start_frames_rule - forces the extracted start_images to a legal 8n+1 count (ltx2_round_down / ltx2_nearest) so the next VAE encode doesn't fail.
  • enable_math / math_operation - adjusts the overlap count arithmetically (a-b, a-1, a+b, …). The classic use is trimming the passed-along start frames to 8n+1 while keeping the blend window wider.

And there are presets that set overlap/blend/seam options in one click - target_extension_ltx2, the 24fps refresh presets, cut_bestofk_*, micro_crossfade_3. The custom default keeps your manual settings.

The inputs and outputs that matter

You'll genuinely set these most of the time:

  • source_images + new_images - the two segments to stitch.
  • preset - start here. target_extension_ltx2 is the sensible baseline for LTX.
  • overlap_frames - blend window (default 10).
  • color_match_mode - turn on luma_only if you see color drift between segments.
  • seam_search_mode + k_search - turn on best_of_k if you see rewind/odd-restart artifacts.

Outputs: source_images (pass-through), start_images (for the next pass's conditioning), extended_images (the growing clip), plus overlap_frames, calculated_frames, extension_frames INTs and a report STRING.

Installing it

In IAMCCS-nodes. ComfyUI Manager → search "IAMCCS" → install, or:

cd ComfyUI/custom_nodes
git clone https://github.com/IAMCCS/IAMCCS-nodes.git

Restart ComfyUI, find it under IAMCCS/LTX-2. No models or extra Python deps.

Common issues

Two traps. First, the quality knobs default to off - this is a compatibility decision (existing workflows shouldn't change behavior on update), so if you're seeing seams and didn't touch anything, that's expected; the node isn't broken, the nice features are just opt-in. Second, don't stack it with the simple version in the same graph - they do the same job and will fight over the overlap math. And worth knowing: this node's whole purpose is feeding image batches around, so it pairs with FirstLastLatentControl (which locks those start frames into the latent) rather than replacing it. The report output tells you exactly what blend and overlap actually ran - read it once and you'll know which knobs to turn.

CategoryIAMCCS/LTX-2

Inputs (18)

NameTypeDefaultDescription
source_imagesIMAGEThe source images to extend (from previous generation)
overlap_framesINT101–256Number of overlapping frames between batches
overlap_sideCOMBOsourceWhich side to take overlap frames from
overlap_modeCOMBOlinear_blendBlending method for overlapping frames
enable_mathBOOLEANtrueEnable math calculations for frame adjustments
math_operationCOMBOa-bMath operation to perform on overlap value
safe_modeCOMBOnoneCompatibility: mimic the original workflow behavior (start_images extracted as images[-overlap_frames:-1])
start_frames_ruleCOMBOnoneOptional: force start_images frame count to LTX rule (1 + 8*x) for VideoVAE encode
color_match_modeCOMBOnoneOptional: match color/exposure of new_images to the tail of source_images before merging
color_match_strengthFLOAT1.000–10=no effect, 1=full match (only used if color_match_mode != none)
color_reference_windowINT81–256How many frames from the tail/head to use for stats matching
seam_search_modeCOMBOnoneOptional: search inside new_images for a better seam start (reduces rewind/odd restarts)
k_searchINT00–64How many candidate offsets to test (0 disables). Used only if seam_search_mode=best_of_k
metric_weight_colorFLOAT1.00–5Weight for color/luma continuity metric
metric_weight_edgesFLOAT0.50–5Weight for edge continuity metric
presetCOMBOcustomPreset that auto-configures overlap/blend/seam search options (and updates widgets live). Choose 'custom' to keep manual settings.
new_imagesoptIMAGEThe newly generated images to extend with
math_value_boptINT10–256Second operand for math operations (b)

Outputs (7)

NameTypeDescription
source_imagesIMAGE
start_imagesIMAGE
extended_imagesIMAGE
overlap_framesINT
calculated_framesINT
extension_framesINT
reportSTRING