Select SDXL Resolution
Pick an SDXL size, get clean width and height integers
- INT
- INT
Select SDXL Resolution is a dropdown of four presets - 1080x1080, 720x1280, 1280x720, 600x1800 - plus a multiplier, and it outputs the chosen size as two INTs. On the surface that looks like a glorified label for numbers you could just type into Empty Latent Image. The actual point is subtler: it guarantees the dimensions stay clean multiples of 8, and it scales the whole thing while locking the aspect ratio.
Why multiples of 8 matter: diffusion models work on latents, and the VAE compresses by 8× per side - the docs here are full of that detail. Generate at a dimension that isn't a clean multiple of 8 and you get latent tiles that don't align, which shows up as seams, weird repeats, or off-by-one noise. This node can't give you a non-multiple even if you try, because the arithmetic rebuilds everything from an 8-based base.
How it works
The mechanism is a small piece of integer math. It splits the preset into width and height, divides both by 8, finds the greatest common divisor, multiplies that by your multiplier to get a base, then rebuilds width and height from the ratio - always as base * 8. The nice consequence: with multiplier at 1 you get back exactly the preset you picked, and with 2 you get a clean 1440x2560 from 720x1280, aspect ratio untouched.
Inputs and output
resolution- the dropdown: 1080x1080 (square), 720x1280 (portrait), 1280x720 (landscape), 600x1800 (tall crop).multiplier(default 1) - scales the size up or down. 0.5 gives you half-size multiples of 8; 2 doubles cleanly.
The two outputs are INT width and INT height, in that order. Wire them into Empty Latent Image (or any node that takes width/height as inputs) and you're done. The list is hard-coded, so you can't add a custom ratio to the dropdown - the multiplier handles scaling, not new aspect ratios.
When it's worth using
If you're on an SDXL-lineage model, these are sensible native-ish sizes and the node keeps you honest about latent alignment. But honestly, the outputs are just integers - the "SDXL" label is about the presets, not a hard requirement. If your workflow already routes width/height through a node that takes connected inputs, this is a tidy way to switch between a handful of ratios and scale the whole batch without hunting for two number widgets. For a one-off generation, just type the size in.
Installing it
ComfyUI Manager → search "ComfyUI Simply Nodes" → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/Wicloz/ComfyUI-Simply-Nodes
No requirements.txt, no downloads, no GPU cost. It's pure Python integer math and the only import is math.
Common issues
- Wanted a custom ratio, can't add it: expected - the preset list is fixed in the source. Pick the closest preset and use the multiplier, or use a different resolution node.
- Doubling looks off: with
multiplier2 the output is still a multiple of 8 but may exceed your model's comfortable band. Bigger isn't automatically better - staying near the model's native resolution is the safe move. - Confusing the two outputs: it's width then height. Swap them and you'll get portrait instead of landscape and wonder why the composition flipped.
It's a small widget, and its whole job is to remove a class of dumb mistakes. If you've ever generated at 1012x1012 and gotten artifacts, you know why this exists.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| resolution | COMBO | 4 options: 1080x1080, 720x1280, 1280x720, 600x1800 | |
| multiplier | FLOAT | 1.00 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| INT | INT | — |
| INT | INT | — |