Ino Is Image Square
A square check for workflows that need to branch on aspect ratio
- image
- is_square
A square image is a special case. Not just aesthetically - technically. Upscalers tuned for 1:1, crop nodes that assume square input, social-media pipelines that need exactly 1080×1080: they all behave differently on squares, and a workflow that can detect a square can handle them differently. Ino Is Image Square is the two-second check that makes that possible: true if the image's width equals its height, false otherwise.
It's one of the image helper nodes in ComfyUI-InoNodes, and it's the companion to Ino Is Image Landscape. Where landscape is "wider than tall," this is "exactly equal," and the two together give you a complete three-way split (landscape / portrait / square) for any routing you need.
The input and output
One required input, image (an IMAGE tensor). One output: is_square, a boolean. The check is exact - width equals height, no tolerance, no epsilon. A 1024×1024 is square; a 1024×1020 is not, and the node won't try to be nice about it. If you're feeding it images that should be square but might be a pixel off, you'll want to normalize the crop before this check, not after.
Where it earns its keep
- Branch on format. Feed the boolean into
Ino Switch On Booland run squares through a square-optimized path (or crop them to square with a different strategy). - Save-time routing. Gate a save or S3 upload on whether the output is square, so 1:1 results land in their own folder.
- Validation. In a batch pipeline, flag images that unexpectedly aren't square - useful when your workflow promises square output and something upstream slipped.
It combines naturally with the rest of the pack's logic: pair it with Ino Is Image Landscape for the full aspect split, or with Ino Compare Float when you need to check a numeric dimension rather than equality.
Gotchas
Same honest caveats as its sibling: this measures the raw decoded tensor, not any EXIF orientation, and it's an exact equality test - no "almost square" mercy. Also, if you're checking images that go through a resize, remember the check reflects whatever you fed it. Feed it a 1080×1080 and it's square; feed it the same image before a crop and it may not be.
The other thing worth saying: this is a gate, not an operator. It doesn't crop, rotate, or fix anything - it just tells you the truth about the aspect ratio. The pack has plenty of crop and resize nodes for the fixing part; this one's for the decision.
Installation
Ships with ComfyUI-InoNodes:
- ComfyUI Manager: search "ComfyUI Ino Nodes", install, restart.
- Manual:
cd ComfyUI/custom_nodes && git clone https://github.com/nobandegani/comfyui_ino_nodes && cd comfyui_ino_nodes && pip install -r requirements.txt, restart.
Python 3.10+, ComfyUI 0.18.1+ (V3 schema), no models or keys. Like every node in this pack it has an enabled toggle - on by default, and there's no reason to turn it off. Simple as the node is, it's the kind of building block that turns a "I'll just look at it" workflow into a "it decides for itself" workflow.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| is_square | BOOLEAN | — |