Nodes/comfyui-sequential-batcher/💉 LTXV Single Frame Injector
ComfyUI Node

💉 LTXV Single Frame Injector

Slam a reference frame into the latent as frame zero

By Meisoftcoltd·Created 7 months ago·Updated 18 days ago· 3
💉 LTXV Single Frame Injector
  • vae
  • latent
  • image
  • latent

LTX Video is a first-frame/last-frame conditioned model - the "first frame" you feed it is a big part of what the output follows. But in a chunked loop, you can't always arrange for that first frame to be a real image you decoded from the VAE; sometimes you have a latent and a reference image and you need to force the image into the latent at position zero. That's the whole job of LTXVSingleFrameInjector.

It's one of those "trust me, you'll know when you need it" nodes. If you're doing LTX 2.x video-to-video, extensions, or keyframe continuity, at some point you'll have a latent that was initialized from one thing and a reference frame that should have been the start - and the stock ComfyUI graph has no clean way to overwrite frame zero of a latent with an encoded image. This node is that way.

How it works

It takes a vae, a latent, and an image. It:

  1. Clones the latent so it doesn't mutate the original.
  2. Reads the VAE's downscale factors (defaulting to 8×32×32, typical for LTXV) to figure out the pixel resolution the latent corresponds to.
  3. Resizes the image to match that resolution with a bilinear upscale if needed.
  4. Encodes the image through the VAE into a latent patch.
  5. Injects it into frame 0 of the samples, and zeroes the noise mask at that position - a mask value of 0.0 means "protect this frame from noise," so the injected frame survives sampling as the model's starting point.

It handles the 4D/5D latent shape difference (if the VAE returns [B, C, H, W] it promotes it to 5D), and it clamps the injection range to what the latent can actually hold.

Inputs and outputs

  • vae (VAE) - your LTX VAE.
  • latent (LATENT) - the target latent, typically straight from an Empty Latent or the sampler chain.
  • image (IMAGE) - the reference frame to inject, e.g. from LoadSceneKeyframe.
  • latent (LATENT) - the modified latent with the frame sealed in at position zero, plus the noise mask that protects it.

The catch

It hardcodes frame index 0 - the name says "single frame injector" and it means it. If you need a middle or last frame injected, this isn't the node. Also, it relies on the VAE's downscale_index_formula attribute; on VAE versions that don't expose it, it falls back to the 8×32×32 assumption, which is right for the LTX family but worth knowing if you feed it an exotic VAE. For LTX 2.3 specifically, remember that the model's VAE wants frame counts of 8n+1 - this node works on whatever latent you give it, but the latent itself should already obey that rule.

Install

ComfyUI Manager → search "comfyui-sequential-batcher", or:

cd ComfyUI/custom_nodes
git clone https://github.com/Meisoftcoltd/comfyui-sequential-batcher

Restart ComfyUI. No model downloads - it uses whatever VAE you wire in. Pack-wide rule: run ComfyUI without --highvram.

Category🔁 Sequential Batcher/Tools

Inputs (3)

NameTypeDefaultDescription
vaeVAE
latentLATENT
imageIMAGE

Outputs (1)

NameTypeDescription
latentLATENT