Aspect Ratio Size Picker
Let the Aspect Ratio Size Picker do the math
- width
- height
Every text-to-image workflow starts the same way: you drop in an Empty Latent Image node and stare at its width and height boxes, trying to remember whether Instagram wants 4:5 or 5:4 and what that works out to at a sensible resolution. Then you type 1024, do the ratio math in your head, type the other number, and hope you didn't fumble it. This node exists to kill that whole loop.
Aspect Ratio Size Picker is a single-purpose utility from the tiny EternalShade3D/ComfyUI-AspectRatioSizePicker pack. You give it a ratio from a dropdown, a long-edge size, and a flip toggle - it hands back clean width and height integers, pre-snapped to ComfyUI's latent alignment. It doesn't upscale, it doesn't resize, it doesn't call any API. It's just a smarter way to fill in two boxes.
What it actually does
The mechanism is embarrassingly simple, and that's the point. The node holds a lookup table of canonical ratios - 1:1, 4:3, 3:2, 5:4, 16:9, 16:10. Whatever ratio you pick, the long edge always maps to the larger dimension, and the other side is scaled down proportionally. Then both values get snapped down to a multiple of 8 (floor, not round), because ComfyUI's VAE works on 8×8 latent tiles - a latent that isn't divisible by 8 will bite you somewhere downstream.
The invert toggle swaps the ratio: 16:9 becomes 9:16, 4:3 becomes 3:4. A small frontend script even flips the visible dropdown labels when you toggle it, so you see the orientation you actually selected instead of a ratio that's lying to you. That's the nicest touch in the whole pack, honestly - most pickers make you guess whether 4:3 means portrait or landscape.
One word of caution if you read the README first: it advertises a third info STRING output that previews the resolved size in text. The version I checked ships RETURN_TYPES = ("INT", "INT") - just width and height. Docs rot; trust the node.
The three inputs that matter
Everything is a dropdown, a slider, and a toggle, so there's barely a learning curve:
- aspect_ratio - the six standard ratios, defaulting to
1:1 (Square). Pick the one your output format wants. - long_edge - an INT slider from 64 to 8192 in steps of 8, default 1024. This is the dimension you're thinking in: "I want a 1024-long 16:9."
- invert - off by default; flip it for the portrait version of the same ratio.
That's the whole input surface. Nothing hidden, nothing optional to hunt for.
Wiring it up
Two wires, one destination:
Aspect Ratio Size Picker ──width──▶ Empty Latent Image
└──height──▶ Empty Latent Image
Plug width and height straight into an Empty Latent Image node and you're done. Want 1080×1920 for a vertical video? Pick 16:9, set long edge to 1920, flip invert. Want an SDXL-square 1024×1024? That's the default, one node drop away.
Installing it
No dependencies, no model downloads, no GPU-side setup - requirements.txt literally says "No third-party dependencies," and the node uses only Python's standard library on top of ComfyUI core. Two install paths:
ComfyUI Manager (the easy way): open Manager, search "Aspect Ratio Size Picker", install, restart.
Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/EternalShade3D/ComfyUI-AspectRatioSizePicker.git
# restart ComfyUI
Where people get burned
- The classic: node doesn't show up after install. Restart ComfyUI - custom nodes aren't hot-reloaded, and this one's frontend half only loads at boot.
- Expecting the
infooutput: see above. The README's text preview isn't in the shipped code; if you wire up a socket that isn't there, you'll get an error and think you broke something. - Chasing the slider max: just because
long_edgegoes to 8192 doesn't mean your checkpoint likes it. Generate far past a model's native resolution - 1024 for SDXL - and you get duplicated anatomy and tiling before you ever upscale. The node is a canvas picker, not a permission slip (the KB's troubleshooting essay covers the native-resolution table in detail). - The 8-pixel rounding: snapping is a floor, so a 3:2 at 1024 long edge gives you 680×1024, not a mathematically perfect 682.67×1024. It's invisible in practice and your VAE will thank you.
Is this node life-changing? No. But for a workflow you run fifty times, it's the difference between redoing the math and just picking from a menu. It's free, it's dependency-free, and it does exactly one thing without getting in the way. That's a rare quality in the custom-node world - grab it.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| aspect_ratio | COMBO | 1:1 (Square) | 6 options: 1:1 (Square), 4:3 (Standard), 3:2 (Classic 35mm Film), 5:4 (Large Format), 16:9 (Widescreen), 16:10 (Widescreen) |
| long_edge | INT | 102464–8192 | — |
| invert | BOOLEAN | false | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| width | INT | — |
| height | INT | — |