Nodes/ComfyUI-Rennart/πŸ“… Rennart Image Size
ComfyUI Node

πŸ“… Rennart Image Size

A tape measure for any image, with the image passed straight through

By Rennart2025Β·Created 4 days agoΒ·Updated 4 days agoΒ· 2
πŸ“… Rennart Image Size
  • image
  • image
  • width
  • height
  • longest_side
  • shortest_side
  • info

Rennart Image Size is a pure measurement node from the ComfyUI-Rennart pack: you feed it any IMAGE and it reports back the width, height, longest_side, shortest_side, and a formatted info string - while also passing the original image through untouched on its image output. It's the kind of plumbing node that looks pointless until you're mid-workflow, staring at a generated image and needing its dimensions as numbers to feed something else, and you realize ComfyUI core doesn't just hand you that.

How it works

There's no magic, and that's the point. It reads the tensor's spatial dimensions, computes longest_side and shortest_side (handy when you only care about "how big is this, roughly," or when feeding aspect-ratio logic), and formats the info string as Width: 1024, Height: 1024. The image output is the exact same tensor it received - a passthrough, not a copy or a transform. The whole node is one shape inspection and a few numbers out.

That passthrough design is what makes it pleasant to live with: you can drop it into an existing wire without rerouting anything. The image still flows where it was going; you've just tapped a few numbers off the side. It's the same "value out of a widget" idea that primitive and metadata nodes fill across the ecosystem, just applied to image dimensions.

The inputs and outputs that matter

One input: image. That's it - no settings, no modes, nothing to misconfigure.

Outputs:

  • image - the unchanged input, for chaining.
  • width, height - the dimensions as INTs.
  • longest_side, shortest_side - max and min of the two, as INTs.
  • info - a STRING like Width: 1024, Height: 1024. You can drop this into a note node or a filename template, or feed it to any node that consumes text.

Install and gotchas

Part of the ComfyUI-Rennart pack, so one install covers it:

# ComfyUI Manager: search "ComfyUI-Rennart", or:
cd ComfyUI/custom_nodes
git clone https://github.com/Rennart2025/ComfyUI-Rennart

Restart ComfyUI and it's under Rennart/Image. No models, deps are just torch/numpy.

The only real caveat is expectation-setting: this node measures, it doesn't change. If you wire its width/height into an Empty Latent you're just copying numbers over, not forcing a resize - make sure whatever consumes the dimensions actually uses them. Also worth noting it reports the tensor's spatial dimensions, so if an upstream node already resized the image, you get the resized values, not some "original" size the graph no longer has. For that reason, put it after your resize if you want the numbers downstream will actually see - or before it if you're checking what the resize took in. And if you're comparing this to the pack's Image Crop node, the difference is clear: Crop actually changes the image, Size only reports on it.

CategoryRennart/Image

Inputs (1)

NameTypeDefaultDescription
imageIMAGEβ€”

Outputs (6)

NameTypeDescription
imageIMAGEβ€”
widthINTβ€”
heightINTβ€”
longest_sideINTβ€”
shortest_sideINTβ€”
infoSTRINGβ€”