Nodes/IAMCCS-nodes/IAMCCS_Ltx2HelperModules Keyframe Timeline
ComfyUI Node

IAMCCS_Ltx2HelperModules Keyframe Timeline

Decide when long LTX-2 video needs a refresh

By IAMCCS·Created 11 months ago·Updated 7 days ago· 113
IAMCCS_Ltx2HelperModules Keyframe Timeline
  • parent_contract
  • linx
  • keyframe_payload
  • contract
  • linx
  • has_refresh
  • is_reanchor_segment
  • recommended_refresh_mode
  • protected_head_frames_out
  • preferred_tail_start
  • report
planner_payload{}
keyframe_positions_modenone
keyframe_positions
refresh_mode_policyauto
protected_head_frames9
settling_frames_default9
min_keyframe_spacing_frames8
refresh_interval_segments2
reanchor_every_segments3
prefer_tail_refreshtrue

Every long video model has a drift problem: keep extending, and the character slowly stops being your character, the color wanders, the camera forgets where it was. The fix the community settled on is refresh - periodically re-anchoring the generation onto reference frames so it can't wander too far. The question is when. Ltx2HelperModules KeyframeTimeline is the scheduling node: it decides, for each segment of an LTX-2 project, whether this segment needs a refresh, and what kind.

It's pure decision-making - no pixels are touched here. It reads the planner_payload to know where the current segment sits in the timeline, applies your refresh rules, and hands a keyframe_payload to RefreshPolicy, which turns the decision into concrete numbers for the extension nodes.

How it works

Three kinds of refresh get scheduled, and this node figures out which apply to the current segment:

  • Keyframe-triggered - you provide keyframe_positions (a list in global_frames, global_seconds, or global_ratio), which get converted to the segment's local frames. Positions too close to the segment head (protected_head_frames, default 9) or too close together (min_keyframe_spacing_frames) are skipped.
  • Periodic - refresh_interval_segments (default 2) refreshes every N segments, on top of any explicit keyframes.
  • Reanchor cadence - reanchor_every_segments (default 3) marks a segment as a full reanchor (stronger, FLF-based refresh) rather than a lighter continuity refresh.

The refresh_mode_policy decides the style: auto (default) picks based on the situation - reanchor segments get flf_blend, otherwise tail_refresh or anchor_only; or force anchor_only, tail_refresh, flf_blend, or disabled. prefer_tail_refresh (default true) biases auto toward refreshing the tail region, which is cheaper and usually sufficient. settling_frames_default is how many frames at the tail get left for the refresh to work with.

The inputs and outputs that matter

For most projects you set keyframe_positions_mode + keyframe_positions (if you have specific beats to lock), and leave the interval/cadence defaults alone. The outputs you'll actually use:

  • has_refresh - BOOLEAN, "this segment needs a refresh."
  • is_reanchor_segment - BOOLEAN, "this is a full reanchor, not a light refresh."
  • recommended_refresh_mode - STRING telling RefreshPolicy what style to use.
  • protected_head_frames_out and preferred_tail_start - the actual frame indices for the refresh region.

Plus keyframe_payload, contract, linx, and report.

Installing it

Ships in IAMCCS-nodes under IAMCCS/Ltx2 Helper Modules. Manager → "IAMCCS" → install, or:

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

Restart ComfyUI. No models, no extra dependencies.

Common issues

The most common mistake is treating keyframes as absolute guarantees: the node silently drops keyframes that land inside the protected head or too close to another keyframe (that's the spacing rules doing their job - you don't want a refresh slamming in during the first 9 frames). If a keyframe you set never fires, check min_keyframe_spacing_frames and protected_head_frames. Second: on the very first segment (segment_index 0) both periodic and reanchor logic are skipped by design - the first clip is your anchor; it can't reanchor to itself. And remember the output is advice, not action: KeyframeTimeline recommends, RefreshPolicy decides the strength, and ReanchorLatent/Continuity actually execute. Wiring its output straight into a sampler does nothing.

CategoryIAMCCS/Ltx2 Helper Modules

Inputs (12)

NameTypeDefaultDescription
planner_payloadSTRING{}
keyframe_positions_modeCOMBOnone4 options: global_frames, global_seconds, global_ratio, none
keyframe_positionsSTRING
refresh_mode_policyCOMBOauto5 options: auto, anchor_only, tail_refresh, flf_blend, disabled
protected_head_framesINT90–256
settling_frames_defaultINT90–256
min_keyframe_spacing_framesINT80–512
refresh_interval_segmentsINT20–256
reanchor_every_segmentsINT30–256
prefer_tail_refreshBOOLEANtrue
parent_contractoptIAMCCS_SUPERNODE_CONTRACT
linxoptIAMCCS_SUPERNODE_LINX

Outputs (9)

NameTypeDescription
keyframe_payloadSTRING
contractIAMCCS_SUPERNODE_CONTRACT
linxIAMCCS_SUPERNODE_LINX
has_refreshBOOLEAN
is_reanchor_segmentBOOLEAN
recommended_refresh_modeSTRING
protected_head_frames_outINT
preferred_tail_startINT
reportSTRING