LTX-2 TimeFrameCount
LTX-2 won't take 80 frames. This node remembers that for you
- length
- seconds
- report
Every LTX-2 workflow trips over the same wall eventually: the VAE only accepts frame counts of the form 8n + 1 - 81, 89, 97, 121. Ask for a clean 80 and the pipeline rounds you, or just errors out, and you spend ten minutes figuring out why your I2V conditioning is off by one frame. IAMCCS_LTX2_TimeFrameCount is a two-widget helper that does that math for you and keeps your duration and frame count honest.
It's part of the IAMCCS-nodes pack from IAMCCS (Carmine Cristallo Scalzi), the same author who ships the LTX-2.3 low-VRAM workflows that let an RTX 3060 hit 1080p clips. This node is the boring-but-essential companion: a duration-only helper for I2V graphs where you set how long you want the clip and let the node figure out what frame count that actually means.
How it works
LTX-2's spatiotemporal VAE compresses in chunks of 8, so the encode/decode grid is 8n + 1 frames. TimeFrameCount takes your requested seconds and length, then rounds the length up to the next valid 8n + 1 value. The rounding direction matters: it goes up, never down, so you don't silently lose the tail of your clip. It then reports the implied frames-per-second so you can sanity-check that your math matches your KSampler.
The two widgets are linked in the UI - change seconds and length recomputes, and vice versa, syncing through the nearest FrameRateSync with a 24fps fallback if you haven't wired one in.
Inputs and outputs
seconds(FLOAT, default 4) - target duration. Range is wide (0.01 to 3600) because long-video extension is a real use case here.length(INT, default 81) - target frame count. This is the value that gets snapped up to 8n + 1.
Outputs:
length(INT) - the corrected 8n + 1 frame count. Feed this to your empty-latent or duration-aware nodes.seconds(FLOAT) - echoed back for wiring convenience.report(STRING) - a text summary of what was corrected and the implied FPS. Handy for a text display node, and genuinely useful when you're debugging "why is my video 89 frames not 80."
That's the whole node. It doesn't make an image, doesn't touch your model - it's a glorified, correctly-rounded calculator that lives in your graph so the constraint is enforced where you can see it.
How to install
IAMCCS-nodes is on ComfyUI Manager - search "IAMCCS" and install the pack. Or clone it by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/IAMCCS/IAMCCS-nodes.git
Restart ComfyUI. The pack needs ComfyUI ≥ 0.3.0, Python ≥ 3.12 and Torch ≥ 2.8, but you'll already be on those if you're running LTX-2 at all. No extra models download for this node - the LTX-2 checkpoint and VAE come from elsewhere.
Gotchas
The one thing that trips people: it rounds up. Set length to 80 and you'll get 81. That's the LTX-2 constraint doing its job, not a bug - trying to force 80 through the VAE is what breaks videos in the first place. If the reported length looks surprising, the report output tells you exactly what happened. And remember this is a helper for planning frames, not the validator itself - if you want an actual IMAGE with validated dimensions, the sibling IAMCCS_LTX2_Validator node is the one that makes pixels.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| seconds | FLOAT | 4.000.01–3600 | — |
| length | INT | 811–16385 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| length | INT | — |
| seconds | FLOAT | — |
| report | STRING | — |