Image Size π
Stop retyping dimensions into resize nodes
- image
- width
- height
- longest_edge
- shortest_edge
- count
The most boring node in the AusBoss pack, and the one you'll quietly use in every workflow. Image Size π reads an image's dimensions and hands them to the graph as INTs - width, height, longest edge, shortest edge. That's the whole job.
It exists because of a failure mode that's endemic in ComfyUI: you resize an image by hand-typed numbers, then you change the source image, and now every downstream node that keyed off the old numbers is wrong. The knowledge base calls this the plumbing layer - nodes that fight repetition and illegibility - and this is a textbook case. Wire width and height into a resize, latent, or conditioning node once, and the numbers are defined by the actual image, not by a value you typed three weeks ago.
The four outputs
widthandheight- the obvious ones, in pixels.longest_edgeandshortest_edge- the larger and smaller of the two.
That pair is the sleeper feature. "Scale to 1024 on the long edge" is a phrase you type into a dozen different workflows, and it's exactly the calculation people hand-roll with a math node. Here it's just an output. Shortest edge gets you the safe side for "keep this under X so it doesn't blow VRAM."
How you'll actually use it
The standard pattern: Image Size β its longest_edge into a resize or latent node's size input, with maybe an Align Image after it to snap the result to a sampler-friendly multiple. Two tiny nodes and you've replaced the "retype the resolution every time the source changes" habit for good.
One thing to know: like most of this pack's nodes, it measures whatever batch you hand it, so a video's frames output gives you the frame dimensions - which is a handy way to keep video pipes honest too.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/ausboss/ComfyUI-AusBoss.git
Restart ComfyUI and search for AusBoss (also in ComfyUI Manager under ComfyUI-AusBoss). No extra dependencies - Pillow, NumPy, and Torch come with ComfyUI; minimum supported version is 0.27.1.
Troubleshooting
There's genuinely not much to break here. If a downstream node ignores the INTs, you've wired into a widget that was never converted to an input - right-click the target node's widget and pick "Convert to input" first. And note this node measures the input batch as-is: if you want the size after a transform, put it after the transform, not before.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | BHWC image batch to measure. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| width | INT | Width in pixels. |
| height | INT | Height in pixels. |
| longest_edge | INT | The larger of width and height. |
| shortest_edge | INT | The smaller of width and height. |
| count | INT | Number of images in the batch - the frame count for video frames. |