LTXV Diagnostic (Shape Checker)
When Your LTX Video Latents Look Weird, This Tells You Why
- latent
- latent
- info
If you've done any serious work with LTX Video, you know the experience: the sampler runs, and then something downstream silently chokes because the latent you handed it isn't shaped the way the next node expects. LTX is Lightricks' speed-first video family - the DiT + high-compression spatiotemporal VAE combo that generates way faster than it plays - and it has a nasty habit of representing variable-length clips as NestedTensors (jagged tensors where each "frame group" can have a different shape) rather than one nice rectangular tensor. Ordinary shape debugging goes out the window. LTXVDiagnosticNode exists to tell you exactly what you're holding before you feed it to an Audio Decode or a Sampler and watch it explode.
It ships in AnotherUtils (marcoc2/ComfyUI-AnotherUtils), and it's one of the most useful cheap nodes in the pack: no models, no dependencies, nothing but introspection. It's the kind of node you leave in a broken workflow permanently because you never know when the next shape error is coming.
How it works
You drop it inline, pass it the LATENT dict, and it looks inside latent["samples"] and reports what it finds:
- Whether the samples are a ComfyUI
NestedTensorwrapper, a native PyTorch nested tensor, or a plain rectangular tensor. - The shape and dtype of every inner tensor - that's the part that actually matters when two video segments of different lengths got packed into one latent.
- Whether a
noise_maskis present and what shape it is. - Any other unexpected keys in the latent dict.
It then prints all of that to the console (toggle with print_to_console) and passes the latent straight through untouched. The info output gives you the same text as a string, which you can preview in the UI or wire into a text display node - handy when you're debugging a workflow you can't watch the console on.
The inputs
latent- whatever the sampler/VAE handed you. The whole point is to not know what it is yet.node_name- a label for the console output. If you have several diagnostics in one graph, name them so the log isn't a mystery.print_to_console- on by default; flip it off once you're confident and just want theinfostring.
Outputs
latent- a perfect passthrough. Nothing is modified, which means you can keep the node in the graph without changing behavior.info- the multi-line diagnostic text as aSTRING.
Installing it
Standard AnotherUtils install:
cd ComfyUI/custom_nodes
git clone https://github.com/marcoc2/ComfyUI-AnotherUtils.git
Restart ComfyUI, or search "AnotherUtils" in ComfyUI Manager. That's it - this node imports nothing heavier than torch and logging.
Where people get burned
The main trap is expecting a fix rather than a diagnosis. This node finds the problem; it doesn't solve it. If it reports "ComfyUI NestedTensor Wrapper" and you need a rectangular tensor for a node that can't handle nested shapes, you still have to find the right unstacking/concat node for your pipeline. Where it shines is the 50/50 case - you're not sure whether the problem is a shape mismatch, a missing noise mask, or a completely different latent layout. Two minutes with this node tells you which rabbit hole to go down. Also worth remembering: LTX-2 models the video-and-audio-together family, and audio-synced clips are exactly where nested latent structures get weird, so this is your first stop when an LTX-2 workflow starts complaining about shapes you've never seen before.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| latent | LATENT | — | |
| node_name | STRING | LTXV Diagnostic | — |
| print_to_console | BOOLEAN | true | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | — |
| info | STRING | — |