Nodes/ComfyUI-Qais-Helper/QH: SDXL Resolution
ComfyUI Node

QH: SDXL Resolution

A dropdown that types the right SDXL resolution for you

By QaisMalkawi·Created 3 years ago·Updated 6 months ago· 2
QH: SDXL Resolution
    • width
    • height
    resolution

    "QH: SDXL Resolution" is the manual-pick sibling of the pack's Nearest SDXL Resolution node. Where that one figures out the right size for you from an image, this one just gives you a dropdown of the nine official SDXL training resolutions and turns your selection into two clean integers. That's it. It's a convenience node, and it's fine that it's a convenience node.

    Why you'd bother: SDXL was trained on a fixed set of aspect ratios, and generating between them is where the stretched bodies and doubled heads come from. The canonical advice is "generate at a trained ratio, then upscale." But that means remembering the list - 1024x1024, 1152x896, 896x1152, 1216x832, 832x1216, 1344x768, 768x1344, 1536x640, 640x1536 - and typing the same dimensions over and over into EmptyLatentImage or whatever size-slot your sampler uses.

    This node replaces that memory with a dropdown. Pick "1344x768" and you get 1344 as width and 768 as height, on two separate INT outputs, ready to wire anywhere a size is expected.

    How it works

    There is no cleverness here, which is fine. The node has a hardcoded list of the nine resolutions above, split into width, height, and ratio. When you select one, it splits the "WxH" string and returns the two integers. The code is maybe fifteen lines. It's the kind of node you could have written yourself after your third time typing 1152x896, and that's exactly why it exists.

    Inputs and outputs

    • resolution - the only input, an enum with those nine choices. Each is the exact WxH string.
    • width - INT
    • height - INT

    Feed the two INTs into EmptyLatentImage, or into any control node that takes width and height. The most natural use is pairing it with a KSampler so your base generation always starts on-ratio.

    Installing it

    The standard QaisHelper route applies - this is a numpy-only pack, no model downloads:

    • ComfyUI Manager - search "ComfyUI-QaisHelper" (or "Qais Helper") and Install.
    • Manual - cd ComfyUI/custom_nodes && git clone https://github.com/QaisMalkawi/ComfyUI-QaisHelper, then restart.

    Because the pack is registered with the Comfy Registry, Manager finds it by title. You'll spot all of its nodes under the "Qais Helper" menu category, and every display name is prefixed "QH:".

    Gotchas worth knowing

    Biggest one: it only offers the nine trained SDXL ratios. That's the feature, not a limitation - but if you're running Illustrious or a model that tolerates up to 1536x1536, you may find this list restrictive and want to type a custom size instead. Also, this node does nothing with images; it's pure number plumbing, so it can't tell you which ratio your reference image actually is. For that, you want the pack's Nearest SDXL Resolution node, which does the ratio math on an input image. If you're doing img2img from a reference, that's the one to reach for; if you're building a fresh text-to-image workflow and just want a tidy dropdown, this is it.

    CategoryQais Helper/Graphics

    Inputs (1)

    NameTypeDefaultDescription
    resolutionCOMBO9 options: 1024x1024, 1152x896, 896x1152, 1216x832, 832x1216, 1344x768, +3

    Outputs (2)

    NameTypeDescription
    widthINT
    heightINT