LTX-2 First/Last Frames Controller ??
Lock LTX-2's first and last frames without touching a VAE
- images
- first_frame
- last_frame
- images
- report
First/last-frame (FLF) conditioning is how you tell an LTX-2 video "start on this exact image" and "end on this exact image." The community knows it from TTP's LTXVFirstLastFrameControl_TTP; this is IAMCCS's take, and it works at the image level - no VAE encode, no latent manipulation. You hand it the conditioning image batch your sampler is about to use, plus reference frames, and it overwrites or blends the head and/or tail of that batch with your references.
That's the key difference from the pack's other FLF node (FirstLastLatentControl): this one operates on the raw IMAGE conditioning tensor, the one LTX gets as the images input - useful when your sampler path expects image conditioning rather than latent locks. It's also simpler to reason about, because what you see is literally what gets injected.
How it works
The mechanism is straightforward: it takes your images batch, and for k_frames frames at the head and/or tail, it replaces or blends in your reference. Three modes:
hard_lock(default) - full replacement. The K frames become your reference, period. Strongest constraint.linear_blend- uniform blend atblend_strength:ref * strength + original * (1-strength). Partial lock.ramp- the blend weight ramps across the K frames (0→strength at the head, strength→0 at the tail), so the constraint eases in and out instead of snapping. Gentler on motion, and the mode that usually looks most natural in practice.
position picks where injection happens: head, tail, or both (default). k_frames (default 4) is how many frames each site affects. If a reference is a single frame, it's repeated across the K slots; a multi-frame reference gets its first K frames used.
The inputs and outputs that matter
images- the conditioning batch (theimagesinput to your LTX sampler).first_frame/last_frame(optional) - your reference images for each end.k_frames,mode,position,blend_strength- the controls above.
Outputs: images (the modified conditioning batch) and report (a STRING that says exactly what was injected - useful because it also tells you when it did nothing, e.g. position=tail with no last_frame connected, which is a silent no-op worth catching).
Installing it
Part of 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 dependencies.
Common issues
The trap is assuming it works on any old image input. It's designed for the conditioning batch - the MISTO-style tensor that already contains both external images and generated frames - not for a standalone 2-frame image. If you feed it a 2-frame batch, k_frames gets clamped to half the total frames and the effect is tiny. For the more common extension case - locking your start/end frames into the actual latent so sampling respects them - you want FirstLastLatentControl instead, which does the VAE encode and noise_mask lock for you. This node is the image-side tool; use the right one for the job or you'll wonder why your "lock" did nothing.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | Conditioning image batch (the 'images' input to the sampler) | |
| k_frames | INT | 41–64 | Number of frames to affect at each injection site |
| mode | COMBO | hard_lock | hard_lock: full replace | linear_blend: uniform blend at given strength | ramp: progressive blend from 0 to strength |
| position | COMBO | both | Where to inject references (head=first K, tail=last K, both=head+tail) |
| blend_strength | FLOAT | 1.000–1 | Max blend weight (ignored for hard_lock which always uses 1.0) |
| first_frameopt | IMAGE | Reference image to inject at the HEAD of the batch (ignored if position=tail) | |
| last_frameopt | IMAGE | Reference image to inject at the TAIL of the batch (ignored if position=head) |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| report | STRING | — |