Nodes/ComfyUI-ResolutionPresets/Resolution Presets (SDXL)
ComfyUI Node

Resolution Presets (SDXL)

Your SDXL output looks stretched? Pick a resolution the model was actually trained on

By big-mon·Created about a year ago·Updated about a year ago· 4
Resolution Presets (SDXL)
    • width
    • height
    preset

    Resolution Presets (SDXL) is a single dropdown that turns "give me a good SDXL resolution" into a labeled one-click choice. It outputs width and height as integers, which you wire straight into an Empty Latent Image node. That's it. That's the whole node.

    It exists for a very specific reason: SDXL wasn't trained on arbitrary resolutions. It was trained on a discrete set of aspect ratios - 1024x1024, 1152x896, 1216x832, 1344x768, 1536x640, and their rotations. Generate far outside those and you get the classic stretched-bodies / duplicate-limbs failure, which the community has been shouting about since day one: "You are using a model trained on 1024x1024 images trying to make images with ridiculously different aspect ratios." This node just stops you from doing that by accident.

    What it actually does

    The mechanism is embarrassingly simple, and that's the point. The preset input is a dropdown with nine entries, each one a WxH (aspect ratio) string:

    1024x1024 (1:1)   1152x896 (9:7)    896x1152 (7:9)
    1216x832 (19:12)  832x1216 (12:19)  1344x768 (7:4)
    768x1344 (4:7)    1536x640 (12:5)   640x1536 (5:12)
    

    When you pick one, the node splits the string on the space, splits the WxH on the x, converts both halves to integers, and returns (width, height). That's the entire node - the whole pack is about forty lines of Python with zero dependencies, no model files, no API calls, nothing to download. If the string ever fails to parse it logs to the console and falls back to 1024x1024 instead of crashing. There's even a dev spec doc sitting in the repo that reads like an AI-agent build log, and the code matches it line for line.

    The magic is in the labels, not the math. When you need a 7:4 canvas you pick "1344x768 (7:4)" instead of doing the aspect-ratio arithmetic in your head - and the ratio name is right there in the dropdown so you actually learn what the numbers mean.

    The inputs and outputs that matter

    There's exactly one input: preset, the dropdown above. Both outputs are integers:

    • width - wired into Empty Latent Image's width
    • height - wired into its height

    That's the standard move: drop this node in, connect both outputs, and now the canvas size lives in one obvious labeled dropdown instead of two unlabeled number boxes. Since it outputs plain INTs, you can also feed it into any other node that takes dimensions - tiled upscalers, crop nodes, you name it.

    Installing it

    Easiest path is ComfyUI Manager - search for "ComfyUI-ResolutionPresets" and install. Or do it by hand:

    cd ComfyUI/custom_nodes
    git clone --depth 1 https://github.com/big-mon/ComfyUI-ResolutionPresets
    

    Then restart ComfyUI. No dependencies, no model downloads, nothing to configure. One heads-up: the README is written in Japanese. Don't let that throw you - the install is git clone plus a restart, and the code is small enough to read in a minute if you ever doubt anything.

    The honest take

    For a beginner this node is genuinely useful, and here's the thing: it's useful because it's dumb. A resolution preset node that did anything clever would be a thing to debug. This one can't break.

    That said, know your alternatives before you commit. The same job is doable with stock nodes - a Primitive plus a conversion node - and bigger suites like WAS Node Suite or ComfyUI-Essentials bundle similar resolution helpers with far more features. If you need custom presets, per-model lists (Flux, Wan), or live canvas previews, you'll outgrow this in a week; heavier tools like ResolutionMaster do all of that. And note the name: this is SDXL-only. Flux wants resolutions divisible by 64 and handles them more flexibly, so if you're not on an SDXL-family model, this fixed list is the wrong tool.

    Common issues

    • Node not in the menu after install: restart ComfyUI. It lives under utils/presets, and the menu search matches the display name "Resolution Presets (SDXL)".
    • It only outputs numbers: don't go hunting for a latent output. Wire width/height into an Empty Latent Image and the actual generation happens there.
    • Stretched output anyway: you're either pasting the raw width/height into a node that ignores them, or you've got a non-SDXL model loaded. Pick a preset that matches your model's family, not just any number you like.
    Categoryutils/presets

    Inputs (1)

    NameTypeDefaultDescription
    presetCOMBO9 options: 1024x1024 (1:1), 1152x896 (9:7), 896x1152 (7:9), 1216x832 (19:12), 832x1216 (12:19), 1344x768 (7:4), +3

    Outputs (2)

    NameTypeDescription
    widthINT
    heightINT