ImpactLatentInfo
Read the raw shape of a latent tensor
- value
- batch
- height
- width
- channel
Let's be upfront about what this is: it's filed under ImpactPack/Logic/_for_test in the pack itself, which is the author's own way of saying "debug tool, not a headline feature." It's not documented anywhere in the README's node list either. Treat it accordingly - a scratch node you drop into a graph temporarily to check something, not a permanent fixture of a finished workflow.
What it does
It takes a LATENT and reads its raw tensor shape back out as four plain integers: how many latents are in the batch, how tall, how wide, and how many channels. No transformation, no side effect - just a window into numbers that are otherwise invisible unless you're staring at a Python traceback.
That's genuinely useful in the moment it's useful. Latent dimensions get silently reshaped constantly - an upscale node changes width and height, a batch operation changes the batch count, switching model families changes the channel count. Most of the time you don't need to know any of this. But when something downstream throws a shape-mismatch error, or a result looks wrong and you suspect an earlier node did something you didn't intend, dropping this node onto the suspect latent and running once tells you exactly what you're actually holding, instead of guessing from a preview image.
The input and outputs
One input: value (LATENT) - whatever latent you want to inspect.
Four outputs, all INT:
- batch - how many latents are stacked in this tensor.
- height, width - the latent's spatial dimensions (not pixel dimensions - latents are downsampled relative to the final image).
- channel - the channel count. Different model architectures produce different channel counts, so this can also double as a sanity check that you're passing the latent to a sampler expecting the same family it came from.
There's nowhere for these to "go" specifically - wire them to a Preview/console-style node, or into math nodes if you're building something that needs to reason about the latent's shape programmatically.
Installing it
Bundled with the whole pack. Via ComfyUI Manager: search ComfyUI Impact Pack, Install, restart. By hand:
cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack
cd ComfyUI-Impact-Pack
pip install -r requirements.txt
(portable: python_embeded\python.exe -m pip install -r requirements.txt), restart. Nothing extra needed - it reads a tensor's shape, it doesn't load a model.
Common issues
Honestly, not much goes wrong with this node specifically - it can't error in an interesting way, it just reports what's there. The more useful thing to know is when to reach for it: it's a debugging aid, so pull it into a graph temporarily when a shape mismatch downstream is confusing you, check the numbers, then take it back out. If you find yourself keeping it in a "finished" workflow permanently, that's usually a sign you actually want the real thing this shape is standing in for - a fixed resolution setting, an explicit batch count - rather than reading it out after the fact every run.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| value | LATENT | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| batch | INT | — |
| height | INT | — |
| width | INT | — |
| channel | INT | — |