SDXL Resolution
Why your SDXL faces look melted — and the bucket-preset node that stops it
- width
- height
- aspect_ratio
- total_pixels
SDXL doesn't have "one" native resolution - it has a list of them. The model was trained on aspect-ratio buckets, a specific set of ~1-megapixel shapes like 1152×896, 1216×832, and 1344×768, plus their rotations. Generate on a bucket and the model behaves. Generate off-bucket and you get the SDXL classic: anatomy that stretches, faces that look like they melted in a warm car.
The SDXL Resolution node from the Image Size Tools pack (TheLustriVA/ComfyUI-Image-Size-Tools) is a dropdown of thirteen of those buckets, so you stop making up numbers and start picking trained ones.
The mechanism, which is gloriously simple
This node is a lookup table. Open image_size_nodes.py and there's a hardcoded dict of the thirteen presets, each mapping a label like "1152×896 (9:7) - Landscape" to a width, height, aspect ratio, and pixel count. You pick from the dropdown, it returns the values. No VAE involved, no math - the divisibility is baked into the presets themselves.
Two constraints are handled for you here. Every preset is divisible by 64 (the strictness SDXL's VAE and bucket system expect), and every one lands right around 1 megapixel - 983,040 to 1,048,576 pixels. That's the whole point of the bucket system: total compute stays roughly constant no matter the shape.
The one input, and the extra output nobody notices
There's a single input: resolution, an enum with thirteen presets. The first is the obvious 1024×1024 native; the rest are the trained landscape and portrait buckets, ranging from 1536×640 banner shapes out to 1600×640 "Extreme Wide."
Outputs:
widthandheight(INT) - wire these into Empty Latent Image and you're sampling at a real training bucket.aspect_ratio(STRING) - the"9:7"-style ratio string.total_pixels(INT) - the one the other resolution nodes in this pack don't give you. Mostly useful as a sanity check that you're staying at ~1MP, or as an input to a workflow that wants to know how much compute a pass costs.
If your workflow keeps coming out stretched, this node is usually the fix: stop feeding Empty Latent your favourite 1280×1024 and use a bucket, then upscale afterward if you need more pixels. That "generate at a trained ratio, upscale after" pattern is the standard SDXL advice, and this node makes the first half one click.
Installing
Same pack as the rest of Image Size Tools. ComfyUI Manager → Install Custom Nodes → search "Image Size Tools", or:
cd ComfyUI/custom_nodes
git clone https://github.com/TheLustriVA/ComfyUI-Image-Size-Tools.git
Restart ComfyUI. Zero dependencies, zero model downloads - this is one of the few node packs where the README can honestly say the setup is just "restart." If nodes don't show up, git pull, clear __pycache__, restart.
The honest take
The bucketed-resolution idea is the most-copied piece of SDXL knowledge, and it's solid - the community has been saying "use the training buckets" since 2023. This node just wraps it in a dropdown. A few notes: these presets apply to the whole SDXL family (Pony, Illustrious, NoobAI and friends all inherit the same base buckets), so it's not SDXL-base-only. And the pack claims the set is based on the official multi-bucket training system, which is the right lineage. If you already know your buckets by heart, it's redundant; if you're tired of melted faces, it's the fastest fix in the graph.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| resolution | COMBO | 13 options: 1024×1024 (1:1) - Native, 1152×896 (9:7) - Landscape, 896×1152 (7:9) - Portrait, 1344×768 (7:4) - Wide, 768×1344 (4:7) - Tall, 1216×832 (19:13) - Cinema, +7 |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| width | INT | — |
| height | INT | — |
| aspect_ratio | STRING | — |
| total_pixels | INT | — |