Nodes/ComfyUI-YarvixPA/πŸš€ Get Resolution
ComfyUI Node

πŸš€ Get Resolution

What resolution is this image, actually?

By YarvixPAΒ·Created about a year agoΒ·Updated 6 months agoΒ· 14
πŸš€ Get Resolution
  • image
  • image
  • width
  • height

Sometimes the thing you're debugging is dumb and small: an image came out at the wrong size and you want to know what it actually is without squinting at a preview or doing math in your head. This node tells you. Give it any image, and it shows the width and height right in the node UI, and hands the numbers out as integer outputs you can wire into anything that needs them.

It's the rare utility node that earns its place twice - once as a debugging eyeball, and once as the source of truth for workflows that need real dimensions at runtime. The pack's own Flux 2 KV workflow uses it, wiring the width/height into image scaling so the graph adapts to whatever resolution the reference images arrive at.

How it works

It inspects the tensor's shape and reports width/height. It handles the common ComfyUI layouts - [B, H, W, C] and 3D [H, W, C] images - with a heuristic for channel-first tensors (if the first dimension looks like a channel count, 1/3/4, it reads the last two dims). If it can't parse the shape it reports an error in the UI instead of crashing.

The image passes through untouched, so it's safe to drop inline anywhere. Outputs: image (passthrough), width, height - all INTs. The display lives in the node itself via a small JS widget, so you get the resolution at a glance without a separate text node.

Install

ComfyUI Manager (search "YarvixPA") or

cd ComfyUI/custom_nodes
git clone https://github.com/YarvixPA/ComfyUI-YarvixPA

restart. Under ComfyUI-YarvixPA/Utils/Image.

When it actually helps

Realistically you'll reach for it in two situations. Debugging: you loaded a workflow and an image is 1344Γ—768 when you expected 1024Γ—1024 - this answers it in one look, and being an output node it forces execution so you get fresh info. And dynamic graphs: feeding width/height into a scale-to-total-pixels or latent-size node means your pipeline follows the input instead of hardcoding a resolution. It's not glamorous, but it's one of those nodes you'll keep in the graph because removing it would cost you a minute of head-math every time.

CategoryComfyUI-YarvixPA/Utils/Image

Inputs (1)

NameTypeDefaultDescription
imageIMAGEβ€”

Outputs (3)

NameTypeDescription
imageIMAGEβ€”
widthINTβ€”
heightINTβ€”