Nodes/IAMCCS-nodes/LTX-2 Condition Next Latent (prev overlap) ??
ComfyUI Node

LTX-2 Condition Next Latent (prev overlap) ??

Lock the overlap so the next segment has nowhere to drift

By IAMCCS·Created 11 months ago·Updated 8 days ago· 113
LTX-2 Condition Next Latent (prev overlap) ??
  • prev_latents
  • next_latents
  • vae
  • conditioned_latents
temporal_overlap24
temporal_overlap_cond_strength0.60

Copying the previous segment's frames into the start of the next is only half of long-video continuity. The other half is locking them - telling the sampler those frames are ground truth it shouldn't rewrite, so the new content has to blend around them instead of re-inventing them. IAMCCS LTX2 ConditionNextLatentWithPrevOverlap does exactly that, and its docstring is refreshingly clear about the division of labor: "We don't run any sampling here - we only" copy the overlap, make sure a noise mask exists, and partially lock those frames.

This is the node you reach for in multi-segment LTX-2 graphs where you've already built per-segment init latents (via first/last-frame locking, context encoding, or both) and just need the previous segment's tail to hold the next one's head in place.

How it works

Two LATENT inputs: prev_latents and next_latents. The node:

  1. Copies the last temporal_overlap frames from prev_latents into the first frames of next_latents.
  2. Ensures next_latents has a noise_mask.
  3. Locks the overlap frames with noise_mask = 1 - temporal_overlap_cond_strength.

The knob that matters most is temporal_overlap_cond_strength (default 0.6). At 1.0 the overlap is fully locked - the sampler treats those frames as fixed and can't change them. At 0.0 nothing is locked, which defeats the purpose. 0.6 is the author's middle ground: enough constraint to stop drift, enough freedom that the sampler can still blend. If you see a hard seam, raise it; if the new segment looks over-constrained or "stuck," lower it.

temporal_overlap is expressed in pixel frames (the LTX convention), and the optional vae input provides the time scale to convert to latent frames - without it, the node assumes 8. This is the same time-scale gotcha as everywhere else in this pack: get this wrong by not passing the VAE and your overlap math will be off.

The single output is conditioned_latents, ready for your sampler.

Why it's separate from sampling

The clean separation is the design point. Because this node only prepares the latent and its mask, it slots into graphs that use any sampler - you're not locked into one sampling backend. That's genuinely useful when you're experimenting between stock samplers and the pack's overlap samplers.

Install

IAMCCS-nodes, the usual two routes:

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

or ComfyUI Manager → search IAMCCS, restart. It works with standard {"samples": BxCxFxHxW} latents, including the audio-video (AV) form, as long as you pass the VAE for the time conversion.

The trap

Skip the vae and you're betting the time scale is 8. LTX's VAE does use 8x temporal compression, so that bet usually pays - but if you're mixing other VAEs or a different LTX build, a wrong conversion shows up as an overlap that's visually the wrong size. When the seam looks "almost right but off by a few frames," that's your first suspect.

CategoryIAMCCS/LTX-2/latents

Inputs (5)

NameTypeDefaultDescription
prev_latentsLATENT
next_latentsLATENT
temporal_overlapINT241–2000
temporal_overlap_cond_strengthFLOAT0.600–1
vaeoptVAE

Outputs (1)

NameTypeDescription
conditioned_latentsLATENT