Nodes/ComfyAngel/Image Info 🪽
ComfyUI Node

Image Info 🪽

What is this image, as numbers

By ThepExcel·Created 8 months ago·Updated about a month ago· 14
Image Info 🪽
  • image
  • width
  • height
  • aspect_ratio
  • orientation
  • summary

Image Info 🪽 is the "what am I looking at" node. Feed it any image and it tells you the width, height, aspect ratio, orientation, and a tidy summary string - all as real outputs you can wire into other nodes. No pixel statistics, no fuss, five useful facts. If you've ever built a workflow that needed to adapt to whatever image was loaded, this is the node that makes the adaptation possible.

The five outputs

  • width / height - INTs straight from the tensor shape. The two you'll wire into an Empty Latent or a resize node when you want to preserve the source dimensions.
  • aspect_ratio - a string like 16:9 or 3:4. It matches against a table of eleven common ratios (1:1, 4:3, 3:2, 16:9, 21:9, 9:16, and friends) within a 2% tolerance; if nothing fits it simplifies the ratio with a GCD, or falls back to a decimal like 1.78:1. Important: it's text, not a number - don't feed it to math nodes.
  • orientation - landscape, portrait, or square, from comparing width to height.
  • summary - one handy string: 1920x1080 | 16:9 | landscape | 2.07MP, with batch:N and alpha appended when relevant. It's the display-friendly version of everything above.

The mechanism is just tensor-shape reading - no decoding, no model. It reads (batch, height, width, channels) off the IMAGE tensor and does the math. That's also why it handles batches fine: it reports the batch size in the summary when there's more than one.

Why you'd reach for it

The genuinely useful pattern is conditional workflows: check orientation or aspect_ratio, feed it into a switch or comparison, and route the image to different processing. Feed width/height into a resize or Empty Latent to keep a pipeline resolution-agnostic. Or just plop it next to a preview so your notes say what each image is. It's the kind of node that looks pointless until you're three workflows deep and desperately want to know an image's dimensions as a number.

One honest note: this node used to output 14 properties (stats, grayscale detection, that sort of thing) and was trimmed to these five in v0.5.0 for usability. If you see an old workflow expecting channels or batch_size outputs from Image Info, that's the history - those no longer exist on this node; the pack's README still shows the older set, but the shipped node is these five.

Installing it

cd ComfyUI/custom_nodes
git clone https://github.com/ThepExcel/ComfyAngel.git

Restart ComfyUI, or search "ComfyAngel" in ComfyUI Manager. Pillow is the only dependency - nothing to download.

That's the whole thing. Small, reliable, no gotchas beyond "aspect_ratio is a string." Five facts, zero drama.

CategoryComfyAngel/Utility

Inputs (1)

NameTypeDefaultDescription
imageIMAGE

Outputs (5)

NameTypeDescription
widthINT
heightINT
aspect_ratioSTRING
orientationSTRING
summarySTRING