Get Image Info
Read width, height, and pixel count off an image
- image
- WIDTH
- HEIGHT
- TOTAL_PIXELS
Get Image Info does exactly what the name promises: hand it an IMAGE, get back its width, height, and total pixel count as three separate outputs. It's a small inspection node, not a transformer - nothing about the image changes, you're just pulling the numbers back out so the rest of the graph can make decisions based on them.
That's useful anywhere a workflow needs to branch or scale based on what it's actually looking at rather than an assumption baked into the graph - computing a resize target as a ratio of the current size instead of a fixed number, deciding whether an image is "big enough" before running an expensive pass on it, or just logging dimensions for debugging when a batch of images from different sources are landing at inconsistent sizes.
How it works
It reads the tensor's shape and reports width and height directly, then multiplies the two to get the total pixel count - no resizing, decoding, or side effects involved.
The inputs and outputs that matter
- image - the IMAGE to inspect. The only input, required.
- Outputs - three of them: WIDTH, HEIGHT, TOTAL_PIXELS.
One thing worth knowing before you wire this up: those three output ports are typed literally WIDTH, HEIGHT, and TOTAL_PIXELS in the schema - not the generic INT type most number nodes use. In practice that's usually fine, since most of this pack's own Math nodes (Ceil, Floor, Modulo, and friends) accept a wildcard * input and will take the connection without complaint. But if you try to wire one of these straight into some other pack's node that strictly expects a plain INT socket, ComfyUI's type-checked connections may refuse it. If that happens, route it through one of this pack's own Math nodes first (Ceil or Abs both pass the value straight through) - that's usually enough to normalize the type on the way out.
How to install it
Comes with the full LogicUtils pack. Via ComfyUI Manager: search ComfyUI-LogicUtils, install, restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/aria1th/ComfyUI-LogicUtils
then restart ComfyUI. No models, nothing to download - it's a shape lookup, about as lightweight as a node gets.
Background on the pack: it's written by aria1th, publicly known as AngelBottomless, the trainer behind Illustrious XL - the SDXL anime finetune that displaced Pony Diffusion v6 as the open-source default. LogicUtils is his side project, documented exactly as much as the README admits: "Proper documentation is being prepared, however there are too many nodes." That's held since the repo's last push in early 2026. It's a real dependency in complex published workflows next to packs like rgthree-comfy and comfyui-kjnodes - people just work out each node from its name and schema, the way this article does.
Common issues & troubleshooting
Can't connect an output to a node that "should" accept it. See the type note above - WIDTH/HEIGHT/TOTAL_PIXELS aren't plain INT sockets. Route through one of this pack's own Math nodes to bridge the type if a strict-INT node refuses the wire.
TOTAL_PIXELS is a bigger number than expected. It's width times height, not width plus height - a 1024×1024 image reports just over a million, not 2048. That's normal, just worth remembering when you're using it as a threshold to gate an expensive operation.
Values look stale after resizing upstream. Make sure Get Image Info sits after whatever resize step you care about in the graph - it reports the dimensions of the image it actually received, not some earlier version of it.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| WIDTH | WIDTH | — |
| HEIGHT | HEIGHT | — |
| TOTAL_PIXELS | TOTAL_PIXELS | — |