Nodes/comfyui_brick_tools/Brick Image Short Size
ComfyUI Node

Brick Image Short Size

The short side of any image

By brick-momen-sirri·Created 4 months ago·Updated 3 months ago· 0
Brick Image Short Size
  • image
  • short_size

Brick Image Short Size does one thing: it looks at an image and outputs the length of its shorter side as an integer. That's the entire node, and it's honestly the most useful kind of node to have around, because "what's the short side of this image?" is a question you ask constantly and core ComfyUI has no clean answer for.

It comes from comfyui_brick_tools - Brick Visual's free archviz toolkit - but unlike the pack's save nodes, it has nothing to do with architecture. It's a plain measurement node, useful in any workflow.

What it's for

  • Resolution normalization. Feed it an image, wire the short_size INT into a scale or resize node, and force every image in a batch to a consistent short side. A 2048×1536 and a 1536×2048 that both land at 1536 short are far easier to batch and compare.
  • Guardrails for video. Video pipelines are picky about resolutions. Checking the short side before a text-to-video or frame-interpolation stage catches a wrong-size input before you waste a multi-minute render.
  • Driving math. Wire the integer into an expression, a conditional, or a text display. It's just a number, so it composes with any of the plumbing nodes that eat INTs.

How it works

The node takes a single IMAGE input and returns one INT output named short_size, computed as min(width, height). Since it's declared an output node, it runs even if you leave the integer socket dangling - the value also shows up in the node's UI text, which is handy mid-iteration. There are no settings, no toggles, no surprises. Measure in, number out.

One thing to know: it measures the tensor's resolution, not per-frame. A batched image all shares one height/width, so you get the batch's short side, which is what you usually want.

Install

It's part of a pack that installs in seconds - no models, no API keys, no requirements.txt:

cd ComfyUI/custom_nodes
git clone https://github.com/brick-momen-sirri/comfyui_brick_tools

Restart ComfyUI, hard-refresh the browser (the pack ships frontend code), and it's there under Brick/Tools. ComfyUI Manager users can just search comfyui_brick_tools.

That's it. If you've ever squinted at a downscaled output and wondered whether it was the short side or the long side that got clamped, this is the node that answers the question instead of guessing.

CategoryBrick/Tools

Inputs (1)

NameTypeDefaultDescription
imageIMAGE

Outputs (1)

NameTypeDescription
short_sizeINT