Nodes/ComfyUI-LTX-Attention-Toolkit/LTX Attn — Latent Dims
ComfyUI Node

LTX Attn — Latent Dims

The three numbers the whole pack keeps asking for

By g-raw·Created 3 months ago·Updated 2 months ago· 2
LTX Attn — Latent Dims
  • latent
  • num_frames
  • latent_height
  • latent_width

The least glamorous node in the LTX Attention Profiler pack, and the one that prevents the most wasted afternoons. Key Map, Query Map, and Zone Analysis all ask you to type in num_frames, latent_height, and latent_width that must exactly match your capture - get them wrong and the node raises a shape error (Sq != T x Lh x Lw). Latent Dims exists to answer that question mechanically: feed it a LATENT, and it hands you those three integers as wireable outputs.

It's a 30-second utility, but it's the connective tissue of the whole workflow. Wire num_frames into the map viewers' num_frames widgets (in ComfyUI, a node's STRING/INT input can be connected to a matching INT output), and you never have to remember "was that 22×40 or 11×20?" again - the README itself notes that the latent grid can be 22×40 or 11×20 depending on where your upscale step sits in the workflow, which is precisely why trusting memory here is a trap.

For LTX-2.3 the geometry has rules baked into the model, not the node: width and height must be divisible by 32, and the frame count must be divisible by 8 plus 1. If your latent doesn't obey those, the model itself will complain long before this node does.

How it works

It inspects the samples tensor inside the LATENT. A 5D tensor [batch, channels, T, H, W] yields T, H, W; a 4D tensor is treated as a single frame. That's the entire mechanism - no model interaction, no hooks, nothing that can fail in a clever way.

Outputs are num_frames, latent_height, latent_width - three INTs, in that order.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/g-raw/ComfyUI-LTX-Attention-Toolkit.git

Restart ComfyUI. No extra dependencies, no model files. This is the one node in the pack you can hand to a total beginner without a lecture.

Common issues

The only real gotcha is that it reads whatever latent you feed it - if you feed it the upscaled latent and your capture ran on the pre-upscale one, the dims won't match the store and the downstream node will error anyway. Wire the same latent source you used for the capture generation. And if you get a 4D tensor where you expected video, that's not this node lying - your pipeline is feeding a still image.

Categoryg_raw/LTX/Profiler

Inputs (1)

NameTypeDefaultDescription
latentLATENT

Outputs (3)

NameTypeDescription
num_framesINT
latent_heightINT
latent_widthINT