Nodes/KJNodes for ComfyUI/LTXVImgToVideoInplaceKJ
ComfyUI Node Runs on cloud

LTXVImgToVideoInplaceKJ

Anchor LTX video to your input frames

By kijai·Created 3 years ago·Updated 2 days ago· 3,030
LTXVImgToVideoInplaceKJ
  • vae
  • latent
  • latent
num_images

LTXVImgToVideoInplaceKJ is an image-to-video conditioning node for LTX. What it does is direct: it takes your input image (or images), encodes them, and drops them in place of specific frames in the video latent. That pins the generation to your actual frames - a real starting image, an ending image, keyframes partway through - so LTX animates from what you gave it instead of hallucinating something loosely related. If you want your generated clip to genuinely begin (or end, or pass through) a specific picture, this is how you nail it down.

How it works

Video generation works on a latent that represents all the frames at once. Normally an img2video setup conditions the model softly on a reference. This node is more literal: it VAE-encodes your image and overwrites the corresponding frame slots in the latent with that encoding, so those frames are your image rather than a suggestion of it. The model then fills in the rest of the sequence around those anchored frames. "Inplace" is the operative word - it's editing the latent directly.

The inputs

  • vae - the LTX VAE, needed to encode your input image into latent space so it can be written into the video latent.
  • latent - the video latent to modify. The node returns a new latent with your frames baked in.
  • num_images - how many input images you're placing, chosen through a dynamic combo widget.

The single output is the modified LATENT, which goes on to your sampler.

A hard requirement to know about

This node uses ComfyUI's newer DynamicCombo widget, and its description spells out the dependency plainly: it requires ComfyUI 0.8.1 and frontend 1.33.4 or later. That's not optional. If you're on an older build, the node either won't appear correctly or its num_images widget won't work. This is the single most likely reason someone hits a wall with it, so before anything else - update ComfyUI and its frontend.

Installing KJNodes

In ComfyUI Manager, search "KJNodes for ComfyUI" in the Custom Nodes Manager, install, restart. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/kijai/ComfyUI-KJNodes, then pip install -r ComfyUI-KJNodes/requirements.txt (portable: python_embeded\python.exe -m pip install -r ComfyUI\custom_nodes\ComfyUI-KJNodes\requirements.txt), then restart. The node needs nothing downloaded, but it only functions inside a working LTX video workflow with the model and VAE in place.

Troubleshooting

If the num_images widget looks broken or missing, that's the version requirement biting - get to ComfyUI 0.8.1 / frontend 1.33.4 or later. If the anchored frames come out wrong or your video ignores the input image, check that you're feeding the correct LTX VAE (a mismatched VAE encodes garbage) and that the modified latent, not the original, is what continues to the sampler. And bear in mind LTX video has its own frame-count arithmetic - the number of frames in a latent isn't arbitrary - so if your placed images land on unexpected frames, the sequence length and how the latent maps to frames is the thing to double-check.

CategoryKJNodes/ltxv

Inputs (3)

NameTypeDefaultDescription
vaeVAEVideo VAE used to encode the images
latentLATENTVideo latent to insert images into
num_imagesCOMBOSelect how many images to insert

Outputs (1)

NameTypeDescription
latentLATENTThe video latent with the images inserted and latent noise mask updated.