Nodes/ComfyUI-Image-Size-Tools/Image Size Detector
ComfyUI Node

Image Size Detector

The unglamorous node that finally tells you what size that image is

By TheLustriVA·Created about a year ago·Updated 10 months ago· 16
Image Size Detector
  • image
  • width
  • height

The Image Size Detector does the most boring thing in ComfyUI and you'll want it more than you think. You feed it an image, it tells you the width and height. That's it. No dropdowns, no presets, no opinions - and unlike the rest of the Image Size Tools pack, this is the one node with a real input instead of a resolution menu.

Why "what size is this image" is a real workflow question

ComfyUI is full of places where you need to know an image's dimensions without squinting at a preview. Image-to-video is the big one: Wan 2.1's I2V pipeline wants a latent whose shape matches your source frame, and the frame you loaded might be 1440×1080, not a clean bucket. Cropping, regional prompting, and scaling between a text-to-image pass and an image-to-video pass all hit the same wall - you need the source dimensions as numbers you can wire into other nodes.

The pack author (websinthe) said it flat-out in the r/comfyui thread where they announced this pack: they barely use the resolution nodes for Empty Latents, they use them "a lot for cropping, outpainting, regional prompting, and scaling between t2i and i2v models." That's exactly the job this node is built for.

How it works

It reads the tensor shape. ComfyUI images arrive as tensors shaped [batch, height, width, channels], and the node's detect_size function grabs that shape and returns width and height as plain integers. There's no re-sampling, no VAE round-trip, no decode - it's the cheapest possible operation, which fits the pack's zero-dependency, one-file design. Anything you can connect as an IMAGE works: a Load Image output, a VAE Decode result, even a preview node's output.

Inputs and outputs

One input:

  • image (IMAGE) - any image tensor in your graph.

Two outputs:

  • width and height (INT) - wire them wherever a size is needed: an Empty Latent, a crop node, a video latent, a text node that labels outputs, anywhere.

One honest caveat

This node reports the image's actual size - it does not make it model-friendly. If you load a 1343×775 photo and feed those exact integers into an SDXL latent, you get the off-bucket stretch problem all over again, because 1343 isn't divisible by 64. Use the detector to know the size, then pair it with the pack's resolution nodes (or your own rounding) when the target model cares. The detector answers "what is it," not "what should it be."

Installing

Same pack as the rest: ComfyUI Manager → Install Custom Nodes → search "Image Size Tools", or:

cd ComfyUI/custom_nodes
git clone https://github.com/TheLustriVA/ComfyUI-Image-Size-Tools.git

Restart ComfyUI. No dependencies, no downloads, nothing to configure.

The honest take

This is a two-output utility node and that's fine - most of the pack is. It's the one you add to a workflow when a node keeps complaining about size mismatch and you need to see the numbers. Zero impress factor, but for i2v and crop workflows it quietly prevents more head-scratching than the fancier nodes in the pack. If you only ever add one node from Image Size Tools to a video workflow, this is a strong candidate - and the pack's resolution dropdowns are right there to fix what it finds.

CategoryImage Size Tool

Inputs (1)

NameTypeDefaultDescription
imageIMAGE

Outputs (2)

NameTypeDescription
widthINT
heightINT