Nodes/IAMCCS-nodes/LTX-2 First/Last ? Latent (Pro, slot caps) ??
ComfyUI Node

LTX-2 First/Last ? Latent (Pro, slot caps) ??

First/Last Latent Pro

By IAMCCS·Created 11 months ago·Updated 7 days ago· 113
LTX-2 First/Last ? Latent (Pro, slot caps) ??
  • vae
  • latent
  • first_image
  • last_image
  • middle_frames
  • latent
  • report
first_strength1.00
last_strength1.00
first_lock_slots1
last_lock_slots1
end_transition_slots0

The base FirstLastLatentControl has one failure mode that drives people up the wall: you lock the first frame, and the model interprets it as a command to freeze - the clip hangs on your anchor image for a beat, or the locked region eats into the temporal slots so hard that your motion dies. The Pro variant exists because of a subtle truth the author found the hard way (it's the same fix that powers his WanImageMotionPro): some VAEs encode even a single image into multiple temporal latent slots, so a naive "lock the head" can silently lock more than you bargained for.

FirstLastLatentControl_Pro is the same node with three extra dials that cap and shape the lock. Same inputs, same outputs - it subclasses the base - plus the control you actually needed.

How it works

Everything from the base node applies (VAE-encode anchors, inject into the latent, set noise_mask). The additions:

  • first_lock_slots / last_lock_slots (both default 1) - a hard cap on how many temporal latent slots get overwritten and locked at each end. If your VAE maps a single frame to, say, 2 latent slots, capping at 1 means only one slot is locked, so the model has room to build motion off it instead of clinging to it. Setting one to 0 disables that end entirely.
  • end_transition_slots (default 0) - an optional transition zone before the hard-locked end. Instead of slamming from "free to drift" straight into "fully locked," the lock ramps in smoothly over N latent slots. This is your fix for the ugly seam right before a hard-locked final frame.

The rest - first_strength, last_strength, first_image, last_image, optional middle_frames - is identical to the base node, and the output is the same latent + report pair. The report tells you what was locked and where, which is your window into whether the slot caps are doing what you think.

The inputs and outputs that matter

  • vae, latent, first_image, last_image - as in the base node.
  • first_strength / last_strength - how hard the lock is.
  • first_lock_slots / last_lock_slots - how many latent slots it may grab. Default 1; that's the correct starting point for most LTX VAEs.
  • end_transition_slots - 0 to 32; add 2–4 if you see a hard seam before the end lock.

Installing it

Part of IAMCCS-nodes. Manager → "IAMCCS" → install, or:

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

Restart ComfyUI, under IAMCCS/LTX-2. It's the same dependency set as the base node (LTX VAE + stock ComfyUI).

Common issues

The trap is going the wrong direction with the dials: if your video is frozen at the start, raise the cap (the VAE is eating more slots than you assumed), and if your anchor isn't holding, lower it. Counterintuitive, but the caps are a ceiling, not a target. Also note the default of 1 is conservative - for a pure I2V start where you genuinely want the first frame locked hard, a first_lock_slots of 2–3 can actually improve adherence without the freeze, because the extra locked slot gives the model a clearer "this is frame zero." Where people get burned: turning on end_transition_slots without checking the report - the transition only helps if the locked end is long enough to ramp into; on a short clip it just eats frames.

CategoryIAMCCS/LTX-2

Inputs (10)

NameTypeDefaultDescription
vaeVAE
latentLATENT
first_strengthFLOAT1.000–1
last_strengthFLOAT1.000–1
first_lock_slotsINT10–8Max temporal latent slots to overwrite+lock at the start (0 disables start lock).
last_lock_slotsINT10–8Max temporal latent slots to overwrite+lock at the end (0 disables end lock).
end_transition_slotsINT00–32Optional transition zone (in latent slots) before the hard-locked end.
first_imageoptIMAGEOptional first frame image
last_imageoptIMAGEOptional last frame image
middle_framesopt*Optional middle-frame accumulator (anytype)

Outputs (2)

NameTypeDescription
latentLATENT
reportSTRING