LTX-2 Validator
The LTX-2 validator that builds your empty latent AND checks the math
- images
- image
- length
- report
LTX-2 is pickier than any video model deserves about its input grid. Frames must be 8n + 1 (81, 97, 121…), and while the spatial side is more forgiving, 16px multiples keep the VAE happy. IAMCCS_LTX2_Validator is what you get when the author got tired of hand-checking both: an EmptyImage-style node that creates a blank IMAGE and, in the same step, validates and fixes the frame count so the downstream encode actually works.
This is the IAMCCS-nodes pack's answer to "set width, height, seconds, and stop thinking about LTX-2's constraints." Same author as the LTX-2.3 low-VRAM workflows making the rounds - the whole point of these helpers is that the 8n + 1 rule stops being something you have to remember.
How it works
Like ComfyUI's stock EmptyImage, it produces a solid-color IMAGE at the width/height you set. The difference is the validation layer. length gets snapped to a valid 8n + 1 frame count, and you choose how it snaps with length_fix: up (round up - the default, never shortens), down, or nearest. There's also autofix - leave it on and the node just fixes things for you; turn it off if you want it to complain instead of silently correcting.
The clever bit is the optional images input. If you connect a real image or frame batch, the node will pad or crop it to match the validated length (images_mode: pad_repeat_last repeats the final frame, crop_end trims). So you can feed a generated first frame from an I2V setup and get out a batch whose frame count is guaranteed valid - no extra node hop.
Inputs and outputs that matter
width/height(defaults 768×512) - spatial size, stepped in 16px already so you're nudged toward valid values.seconds(default 4) andlength(default 81) - the linked duration pair, synced in the UI at your FPS (the FPS itself lives in the siblingLTX-2 FrameRateSyncnode, not here).autofixandlength_fix- whether to fix, and which direction to fix.images(optional) - a frame batch to validate instead of generating a blank.
Outputs:
image(IMAGE) - your blank or validated batch.length(INT) - the corrected 8n + 1 count, so whatever comes next uses the same number you actually made.report(STRING) - a text rundown of what was changed.
How to install
It ships in IAMCCS-nodes, installable from ComfyUI Manager by searching "IAMCCS", or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/IAMCCS/IAMCCS-nodes.git
Restart after cloning. No model downloads come with this node; you still need the LTX-2 checkpoint, its VAE, and the Gemma 3 text encoder from elsewhere. ComfyUI ≥ 0.3.0, Python ≥ 3.12, Torch ≥ 2.8 are the pack's stated floors.
Gotchas
Two things to know. First, length_fix: up is the default because it never shortens your clip - but if you feed it a batch via images and the images have more frames than the target, pad_repeat_last vs crop_end genuinely changes the result, so pick deliberately. Second, don't expect magic beyond the grid: LTX-2's broader quirks - the tinny audio at launch, the way it punishes short prompts, the fact that it renders internally at half resolution - are model behavior, not something this node can fix. It just makes sure your frames and dimensions arrive in a shape the VAE accepts.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| width | INT | 76864–8192 | — |
| height | INT | 51264–8192 | — |
| batch_size | INT | 11–4096 | — |
| color | INT | 00–255 | — |
| seconds | FLOAT | 4.000.01–3600 | — |
| length | INT | 811–16385 | — |
| autofix | BOOLEAN | true | — |
| length_fix | COMBO | up | 3 options: up, down, nearest |
| imagesopt | IMAGE | — | |
| images_modeopt | COMBO | pad_repeat_last | 2 options: pad_repeat_last, crop_end |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| length | INT | — |
| report | STRING | — |