Nodes/ComfyUI-NegiTools/Image Properties πŸ§…
ComfyUI Node

Image Properties πŸ§…

The two little integers every conditional workflow needs

By natto-makiΒ·Created 3 years agoΒ·Updated 2 years agoΒ· 31
Image Properties πŸ§…
  • image
  • WIDTH
  • HEIGHT

This is the simplest node in the pack and one of the handiest. Give it an image, and it hands you back the image's width and height as two integers. That's the entire feature. No models, no API, no settings - one input, two outputs.

Why a node this dumb is worth having

ComfyUI is full of places that need a numeric size: latent dimensions, resize targets, cropping math, conditional routing. The problem is that an image's dimensions aren't an input you can just read in the graph - they're hidden inside the tensor. This node surfaces them as plain INTs you can wire into anything that takes a number. The classic use is keeping downstream nodes in sync with whatever image came out of a previous step, instead of hardcoding sizes that silently drift out of date.

It pairs naturally with the pack's Latent Properties node: Image Properties reads pixel dimensions, Latent Properties reads latent dimensions, and the two let you compare sizes at different points in the pipeline - which is exactly how you debug the "my latent is 8x smaller than my image" confusion the first time you hit it.

Inputs and outputs

  • Input: image (any IMAGE tensor).
  • Outputs: WIDTH and HEIGHT (both INT).

Straight from the source, it just reads image.shape[2] for width and image.shape[1] for height. First image in the batch, so a batch of images reports the batch's common dimensions.

Installing it

It ships in ComfyUI-NegiTools. Install via ComfyUI Manager (search "ComfyUI-NegiTools") or by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/natto-maki/ComfyUI-NegiTools
pip install -r ComfyUI-NegiTools/requirements.txt

then restart. Like the pack's other utility nodes, it needs no API key and no downloads.

When you'd skip it

Honestly, if you never need a numeric size in your graph, you'll never touch this node and that's fine. It's not glamorous. But the moment you're building anything that reacts to image size - an upscaler that adapts to input resolution, a workflow that pads or crops to a target, a comparison that checks whether two images match - this becomes the two wires that hold the whole thing together. For a beginner it's also a genuinely useful teaching tool: wire it up once, and you can see what dimensions your images actually are at every stage of the pipeline.

Categoryutils

Inputs (1)

NameTypeDefaultDescription
imageIMAGEβ€”

Outputs (2)

NameTypeDescription
WIDTHINTβ€”
HEIGHTINTβ€”