LTXV Img To Video Inplace At Index
Pin an image to any frame of an LTX video — not just the first one
- vae
- image
- latent
- latent
If you've done LTX image-to-video in ComfyUI, you've met the built-in LTXVImgToVideoInplace node: it bakes your starting image into the first frame of the latent so the model knows what it's animating. It's the backbone of every stock I2V workflow, and it has exactly one job. This node does that same job, except the image can land on any frame - first, last, middle, frame 27 - and you can chain several of them without them fighting each other.
That turns out to be a bigger deal than it sounds. LTX is fundamentally a first-frame/last-frame model, and since 0.9.5 the community has been conditioning both ends of a clip for far more controllable motion. The Lightricks team even ships an IC-LoRA workflow that drives a video from a reference clip. But the stock node can only touch frame zero. People worked around it with LTXVAddGuide (conditioning-based, which has its own quirks and needs LTXVCropGuides to stop flicker) or with Kijai's LTXVImgToVideoInplaceKJ - which, as one r/StableDiffusion deep-dive put it, resets every previous image's strength and index every time you add a new one. This is the pack that fixes that reset pain.
What it does under the hood
It's a thin wrapper over the built-in logic, and the source is short. You feed it a vae, the image you want to pin, and the latent it should go into. The node:
- Resizes your image to the latent's dimensions (with your chosen
interpolationandcrop). - Optionally runs CRF compression via
LTXVPreprocessand a Gaussianblur_radius- same preprocessing family asLTXVAddGuideAdvanced. - Encodes the image with the VAE, then replaces the latent slice at your target frame index.
- Writes a noise mask at that slice set to
1.0 - strength, so the sampler knows exactly how hard to hold the image.
The two improvements over the stock node are right there in the code. frame_idx can be negative - -1 means the last frame - and it's converted to latent coordinates using the VAE's temporal downscale factor, so you think in pixel frames, not latent frames. And instead of creating a fresh mask, it calls get_noise_mask(latent), reads the mask already attached from a previous chained node, and modifies it in place. That's what lets you stack first-frame and last-frame instances without the second one erasing the first.
The inputs that matter
frame_idx- the one you'll actually touch. Pixel-space frame number;0= first,-1= last, anything in between works. Negative values count back from the end.strength- how hard the image conditions the video.1.0fully locks the frame,0.0does nothing. This is your "how much does the end actually have to match" dial.crf- CRF compression on the input image before encoding;0disables it. Default29is sensible - one of the Lightricks team's own tips is to keep preprocessing CRF around 30–35 and skip the blur.blur_radius,interpolation(defaultlanczos),crop- preprocessing detail. Leave them alone until you see artifacts; CRF and blur are mostly there to keep the encoded image from looking overly crisp and fighting the model's noise schedule.bypass- passes the latent through untouched.
The single output, latent, carries both the modified samples and the accumulated noise mask, so it wires straight into the next node in your chain or into Add Video IC-LoRA Guide / LTXVCropGuides / CFGGuider.
A workflow that uses the point
The README's canonical example is the cleanest way to see why this exists:
EmptyLTXVLatentVideo (97 frames)
→ LTXV Img To Video Inplace At Index (frame_idx=0, first frame)
→ LTXV Img To Video Inplace At Index (frame_idx=-1, last frame)
→ Add Video IC-LoRA Guide (driving video)
→ LTXVCropGuides
→ CFGGuider + SamplerCustomAdvanced
First frame locks your start image, last frame locks your goal, the IC-LoRA guides the motion between. That's the whole trick: two keyframes, zero fighting.
Install
ComfyUI Manager will find it if you search "LTXVideo Extra", or just clone it:
cd /path/to/ComfyUI/custom_nodes/
git clone https://github.com/domprosys/ComfyUI-LTXVideo-Extra.git
Restart ComfyUI. That's the whole install - no requirements.txt, no model downloads, no heavy deps. The one thing you do need is the LTX-2/V checkpoint and VAE already in your workflow, plus the ComfyUI-LTXVideo built-in extras it wraps. Update with git pull.
Where people get burned
The honest caveat: community testing of latent-injection keyframes in the middle of a clip has been mixed - there's a documented pattern of stutter around mid-clip keyframes that first/last frames don't show, and conditioning via LTXVAddGuide tends to behave better there. For the first and last frames this node is exactly what the doctor ordered, and that's what it's built for. Also remember this is an obscure one-man pack with no star power behind it - it's a ten-line quality-of-life fix, so don't expect upstream support; if it works, it's because the wrapper is thin and the wrapped logic is the stock ComfyUI path. That's usually the right kind of risk to take.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| vae | VAE | — | |
| image | IMAGE | — | |
| latent | LATENT | — | |
| frame_idx | INT | 0-9999–9999 | Pixel-space frame index. 0 = first frame, -1 = last frame. Converted to latent index using VAE temporal downscale factor. |
| strength | FLOAT | 1.000–1 | Conditioning strength. 1.0 = fully conditioned, 0.0 = no conditioning. |
| crf | INT | 290–51 | CRF compression. 0 = disabled. Higher values add more compression artifacts. |
| blur_radius | INT | 00–7 | Gaussian blur kernel radius. 0 = disabled. |
| interpolation | COMBO | lanczos | 7 options: lanczos, bislerp, nearest, bilinear, bicubic, area, +1 |
| crop | COMBO | disabled | 2 options: disabled, center |
| bypass | BOOLEAN | false | Bypass the conditioning. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | — |