Nodes/Comfyroll Studio/CR Aspect Ratio SDXL (Legacy)
ComfyUI Node Runs on cloud

CR Aspect Ratio SDXL (Legacy)

The legacy SDXL bucket picker (use the newer one)

By Suzie1Β·Created 3 years agoΒ·Updated 2 years agoΒ· 1,296
CR Aspect Ratio SDXL (Legacy)
    • INT
    • INT
    • FLOAT
    • FLOAT
    • INT
    • show_help
    β—„width1024β–Ί
    β—„height1024β–Ί
    β—„aspect_ratioβ–Ύβ–Ί
    β—„swap_dimensionsβ–Ύβ–Ί
    β—„upscale_factor11.00β–Ί
    β—„upscale_factor21.00β–Ί
    β—„batch_size1β–Ί

    First thing to know: this is a legacy node. Comfyroll itself marks it deprecated and points you at "CR SDXL Aspect Ratio" as the replacement. If you're starting fresh, use that one. This page exists because old workflows still carry this node and people land here trying to figure out what it does.

    What it does is pick you a valid SDXL resolution. SDXL was trained on a specific set of aspect-ratio "buckets" - 1024x1024, 896x1152, 832x1216, 1344x768, and so on - and generating at one of those sizes is the difference between a clean image and a stretched, duplicated mess. This node is a dropdown of those buckets so you don't have to memorize them.

    How it works

    It's a lookup table of SDXL's native training resolutions. Pick a ratio, and it outputs the matching width and height (as plain ints) plus a couple of scale factors you can carry downstream. Unlike the newer aspect-ratio nodes in the pack, the legacy version does not hand you a pre-built empty latent - you take the width and height and feed them into a separate Empty Latent Image node yourself.

    The inputs that matter

    • aspect_ratio - the bucket dropdown: 1:1 square 1024x1024, 3:4 portrait 896x1152, 16:9 landscape 1344x768, 21:9 landscape 1536x640, and the rest, plus custom.
    • swap_dimensions (Off / On) - flip the chosen ratio between portrait and landscape.
    • upscale_factor1 / upscale_factor2 - two scale values passed through on output pins for downstream stages (e.g. a two-pass upscale). They don't resize anything here.
    • batch_size - how many to generate.

    The outputs are generically named - two INTs (your width and height), two FLOATs (the upscale factors), another INT (batch size), and a show_help link. Because they're just labeled INT/FLOAT, keep track of the order: the first two ints are width and height.

    How to install it

    • ComfyUI Manager: search Comfyroll Studio, install, restart.
    • Manual: cd ComfyUI/custom_nodes && git clone https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes.git, then restart.

    No downloads.

    Common issues

    The biggest one is just: you probably shouldn't be using this node. It's kept for backward compatibility, and its replacement (CR SDXL Aspect Ratio) is cleaner and gives you a ready latent. If you're editing an existing graph, swapping to the new node is a five-minute upgrade.

    Beyond that - the outputs being bare INT/FLOAT labels means it's easy to cross the wires. Width is the first int, height is the second; connect them the wrong way and you'll generate a rotated image. And these buckets are SDXL-specific: feed them to an SD 1.5 model and you're generating way above 512px native, which invites the classic doubled-heads artifact. If the node's missing entirely, the pack failed to load (commonly a Pillow mismatch on newer Python), which is a pack-level issue, not this node.

    Category🧩 Comfyroll Studio/✨ Essential/πŸ’€ Legacy

    Inputs (7)

    NameTypeDefaultDescription
    widthINT102464–2048β€”
    heightINT102464–2048β€”
    aspect_ratioCOMBO10 options: custom, 1:1 square 1024x1024, 3:4 portrait 896x1152, 5:8 portrait 832x1216, 9:16 portrait 768x1344, 9:21 portrait 640x1536, +4
    swap_dimensionsCOMBO2 options: Off, On
    upscale_factor1FLOAT1.001–2000β€”
    upscale_factor2FLOAT1.001–2000β€”
    batch_sizeINT11–64β€”

    Outputs (6)

    NameTypeDescription
    INTINTβ€”
    INTINTβ€”
    FLOATFLOATβ€”
    FLOATFLOATβ€”
    INTINTβ€”
    show_helpSTRINGβ€”