ComfyUI Node

SDXL Resolutions

Stop typing 1216x832 from memory

By duckcomfy·Created about a year ago·Updated 10 months ago· 0
SDXL Resolutions
    • width
    • height
    resolution

    Every SDXL regular has the same muscle-memory failure: you know 3:2 is "1216x832" but you type "1226x832" and spend twenty minutes wondering why the composition looks subtly wrong. SDXL Resolutions exists to retire that class of mistake. It's a dropdown of the nine aspect ratios SDXL was actually trained on, and it outputs the matching width and height as integers. Pick, wire, done.

    Why the exact numbers matter: SDXL's native base is 1024x1024, but it was trained on a specific set of aspect ratios - 1024x1024, 1152x896, 1216x832, 1344x768, 1536x640 and their portrait rotations. Wander off those and you're asking the model to compose at a resolution it never saw, which is how you get the stretched bodies and doubled limbs that plague "why does my SDXL look broken" posts. The KB's verdict is blunt: generate at one of the trained ratios, then upscale if you need more pixels. This node is just that discipline in a dropdown.

    The inputs and outputs

    • resolution (enum) - nine choices: square 1024x1024 (1:1), landscape 1152x896 (4:3), 1216x832 (3:2), 1344x768 (16:9), 1536x640 (21:9), and the matching portrait rotations. The dropdown label even tells you the ratio, so you don't have to remember which number maps to 16:9.
    • width (INT) and height (INT) - wire these into any node that wants dimensions. The usual target is Empty Latent Image: right-click its width and height widgets, convert them to inputs, and connect. Do that once and you can also feed the same pair into an aspect-ratio display, an upscale model, or anything else that needs to know your canvas size.

    The 21:9 1536x640 option is where SDXL gets weird - wide ultrawide generations are where the model's single-subject bias shows. It's in the list because it's trained, not because it's always a good idea. For a portrait or a standard landscape, you'll live in the 3:2 and 9:16 entries.

    How to install it

    Part of the duckcomfy personal nodes pack, a utility collection author duckcomfy re-implements to keep dependencies near zero. ComfyUI Manager, search "duckcomfy personal nodes"; or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/duckcomfy/duckcomfy_personal_nodes
    

    Restart, and you're done - no models, no Python dependencies (the pack's pyproject.toml lists none).

    Gotchas

    It's SDXL-only, so don't feed these to a Flux or Wan workflow and expect sanity. All nine values are divisible by 8 and 16, which keeps the latent math clean. And note the node only hands you INTs - it won't resize anything or adjust your latent for you. It's a lookup table with better labeling, and that's the entire job. If you want this for a video model, the same pack has a Wan480 Resolutions node with the 480p presets.

    Categoryduckcomfy

    Inputs (1)

    NameTypeDefaultDescription
    resolutionCOMBO9 options: square - 1024x1024 (1:1), landscape - 1152x896 (4:3), landscape - 1216x832 (3:2), landscape - 1344x768 (16:9), landscape - 1536x640 (21:9), portrait - 896x1152 (3:4), +3

    Outputs (2)

    NameTypeDescription
    widthINT
    heightINT