Common SDXL Resolutions
SDXL's nine native sizes, one dropdown
- width
- height
- aspect ratio
- orientation
SDXL was trained at 1024x1024 and likes a specific family of sizes around it. This node is that family, on a plate: nine preset dimensions from 640x1536 portrait to 1536x640 landscape, each one a native-adjacent size SDXL handles well. Pick one, and you get the width, height, aspect ratio, and orientation out the other side.
If you've spent any time fighting SDXL artifacts - squished faces, stretched anatomy, doubled limbs - you already know why this exists. SDXL punishes off-native aspect ratios harder than SD 1.5 did. A dropdown of known-good sizes is the fast path to not re-learning that lesson every session.
How it works
One required input, dimensions, an enum of nine presets, each labeled with its pixels and aspect:
- 640 x 1536 (5:12 Portrait) through 1024 x 1024 (1:1 Square) up to 1536 x 640 (12:5 Landscape)
Choose one and the node splits it into four outputs: width and height as INTs (ready for Empty Latent), aspect ratio as a STRING like 7:4, and orientation as landscape, portrait, or square. The parsing is straightforward string work - no hidden rounding, no surprises.
Inputs and outputs
dimensions- one required enum, 9 presets.width,height- INT outputs → Empty Latent.aspect ratio,orientation- STRING outputs → Save Image metadata.
The honest take
The aspect ratio and orientation outputs are the reason this node pairs so well with the pack's Save Image: they get stamped into every file's metadata, which is a genuinely nice workflow when you're producing across orientations. But be clear-eyed about scope - these are SDXL sizes. On SD 1.5 you'd rather stay around 512–768 territory, and on modern flow-matching models the rules are different again. For SDXL, though, this is a great default: don't think, just pick the closest preset and go.
One thing to note: the presets stop at 640 on the short side and 1536 on the long side, which is a deliberate native-range choice, not a limitation you need to fight. If you genuinely need bigger, the sibling HelperNodes_WidthHeight lets you go to 16384.
Install
Search ComfyUI-Helper-Nodes in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/teward/ComfyUI-Helper-Nodes
Restart afterwards. The pack's dependencies - numpy, pillow, piexif, whratio - install through Manager; no model files to fetch.
Troubleshooting
The usual gotcha is wiring the outputs into a non-SDXL workflow and wondering why quality drops - that's a model-choice problem, not a node bug. And if aspect ratio or orientation don't appear where you expected, remember they're separate outputs: width and height go to Empty Latent, the strings go to Save Image.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| dimensions | COMBO | 9 options: 640 x 1536 (5:12 Portrait), 768 x 1344 (4:7 Portrait), 832 x 1216 (13:19 Portrait), 896 x 1152 (7:9 Portrait), 1024 x 1024 (1:1 Square), 1152 x 896 (9:7 Landscape), +3 |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| width | INT | — |
| height | INT | — |
| aspect ratio | STRING | — |
| orientation | STRING | — |