KJNodes/ltxvgenerated

LTXV Img To Video Inplace KJ(LTXVImgToVideoInplaceKJ)

Replaces video latent frames with the encoded input images, uses DynamicCombo which requires ComfyUI 0.8.1 and frontend 1.33.4 or later.

LTXV Img To Video Inplace KJ

vae
latent
num_images
latent
KJNodes

Description

The LTXV Img To Video Inplace KJ node replaces specified frames of a video latent tensor with images encoded into the latent space. It is designed to work with video models such as LTXV (Lightning Transformer Video) where you want to insert static images (e.g., keyframes, reference frames) into the latent representation of a video sequence.

The node uses a DynamicCombo input for the number of images to insert, which dynamically creates additional image inputs based on the selected value. This requires ComfyUI 0.8.1 and frontend 1.33.4 or later.

Inputs

NameTypeDescription
vaeVAEThe video VAE used to encode the input images into latent space. Should match the VAE that was used to generate the input latent.
latentLATENTThe original video latent tensor into which the encoded images will be inserted. The latent is expected to have a batch dimension representing the number of frames.
num_imagesDYNAMICCOMBOA dropdown/combobox to select how many images you want to insert. Selecting a number (e.g., 3) will dynamically create that many additional image inputs (e.g., image_1, image_2, image_3). The images are inserted in the order they appear, replacing the corresponding frame positions (starting from the first frame).

Note on dynamic inputs: The exact labels and number of image inputs depend on the selected num_images value. The images should be provided as standard IMAGE inputs (e.g., loaded via a Load Image node) and will be encoded by the connected vae before insertion.

Outputs

NameTypeDescription
latentLATENTThe modified video latent tensor with the encoded images inserted into the specified frames. The batch dimension remains the same as the input latent.

Usage Notes

  • Compatibility: This node requires ComfyUI 0.8.1 or later and frontend 1.33.4 or later to support the DynamicCombo functionality. Using older versions will result in errors or missing inputs.
  • VAE Matching: Ensure the VAE used here matches the VAE that was used to create the input latent. Using a mismatched VAE will produce poor reconstruction or artifacts.
  • Frame Order: The images are inserted into the first N frames of the latent sequence in the order they are supplied. For example, if num_images = 2, image_1 replaces frame 0 and image_2 replaces frame 1. The rest of the frames remain unchanged.
  • Latent Dimensions: The input latent should contain a batch of frames with shape (N, C, H, W) where N is the number of frames. Each encoded image must have spatial dimensions that match the latent's (H, W) for proper insertion.
  • Use Case: This node is useful for conditioning the video generation on specific reference frames, creating consistent loop points, or injecting static visuals into a video pipeline.

Comments

Sign in with GitHub to join the discussion.

Loading comments…
LTXV Img To Video Inplace KJ (LTXVImgToVideoInplaceKJ) - ComfyUI-KJNodes | ComfyUI Wiki