Nodes/ComfyUI-Flow-Assistor/Resolution Selector (Groups)
ComfyUI Node

Resolution Selector (Groups)

Pick the right resolution by megapixel, not by guessing pixels

By Merserk·Created 9 months ago·Updated about a month ago· 6
Resolution Selector (Groups)
    • latent
    • width
    • height
    res_025mp512x512 (1:1)
    use_025mpfalse
    res_06mp768x768 (1:1)
    use_06mpfalse
    res_1mp1024x1024 (1:1)
    use_1mptrue
    res_2mp1408x1408 (1:1)
    use_2mpfalse
    res_3mp1728x1728 (1:1)
    use_3mpfalse
    res_4mp2048x2048 (1:1)
    use_4mpfalse
    batch_size1

    Resolution Selector (Groups) is a one-stop resolution picker that organizes choices by megapixel group instead of throwing 40 aspect ratios at you in a single flat dropdown. Six groups - 0.25MP through 4MP - each hold nine aspect ratios (1:1, 4:3, 3:4, 3:2, 2:3, 16:9, 9:16, 21:9, 9:21). You pick a resolution inside each group, flip the use_ toggle on exactly one group, and the node hands you the matching empty latent plus width and height. One node replaces the "Empty Latent + resolution math" pair you'd otherwise hand-build.

    How it works

    The mechanism is a picker plus a latent factory. The active group is chosen by scanning the toggles in order (0.25, 0.6, 1, 2, 3, 4) and taking the first that's enabled - use_1mp defaults to true, so out of the box you get 1MP, the sane starting point. The output latent is a zeroed tensor at 8× downscale (a 1024×1024 selection becomes a 128×128×4 latent), sized to the selected width/height and to your batch_size (1–64, so you can build a batch latent without extra nodes).

    Inputs worth knowing:

    • res_1mp and use_1mp - the defaults; this is where you'll live most of the time.
    • batch_size - how many empty images the latent holds. Turn it up only if your sampler and VRAM actually handle a real batch.
    • The rest of the use_* toggles - flip the group you want active; everything else sits dormant with its own resolution selected, so switching from 1MP to 2MP is a single toggle.

    Outputs are latent, width (INT), height (INT) - wire the ints into anything that needs to know the canvas size (image size nodes, save nodes, upscale math).

    The honest take on megapixels

    The groups map roughly to what each model family was trained at: SDXL is happy around 1MP, Flux-native sits near 1–2MP, and 4MP is squarely into "hires territory" where most checkpoints weren't trained. Generating straight into 3–4MP on an SDXL checkpoint tends to produce the tiling/repetition artifacts the community has been fighting for years - the fixes are hires-fix or tiled upscaling, not a bigger Empty Latent. So treat 2MP+ groups as the "I know what I'm doing" shelf, not the default. The 0.25MP group is genuinely useful for quick concept previews that are fast to render.

    Installing

    Part of ComfyUI-Flow-Assistor - ComfyUI Manager (search "Flow Assistor") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Merserk/ComfyUI-Flow-Assistor.git
    

    Restart after cloning. Current ComfyUI required (V3-only pack), no extra dependencies or downloads.

    Where people get burned

    The "first enabled toggle wins" behavior can bite: if you leave use_1mp on while flipping use_2mp on, the node silently uses 1MP because it's earlier in the scan order. Only one toggle should ever be on. And since this produces a blank latent, it's for text-to-image starts - if you're doing image-to-image, the pack's Image Resolution Extractor or Fit node is the better fit because it matches the latent to a real input image.

    Categoryflow-assistor/image

    Inputs (13)

    NameTypeDefaultDescription
    res_025mpCOMBO512x512 (1:1)9 options: 512x512 (1:1), 576x432 (4:3), 432x576 (3:4), 624x416 (3:2), 416x624 (2:3), 680x384 (16:9), +3
    use_025mpBOOLEANfalse
    res_06mpCOMBO768x768 (1:1)9 options: 768x768 (1:1), 896x672 (4:3), 672x896 (3:4), 936x624 (3:2), 624x936 (2:3), 1024x576 (16:9), +3
    use_06mpBOOLEANfalse
    res_1mpCOMBO1024x1024 (1:1)9 options: 1024x1024 (1:1), 1152x864 (4:3), 864x1152 (3:4), 1216x832 (3:2), 832x1216 (2:3), 1344x768 (16:9), +3
    use_1mpBOOLEANtrue
    res_2mpCOMBO1408x1408 (1:1)9 options: 1408x1408 (1:1), 1632x1216 (4:3), 1216x1632 (3:4), 1728x1152 (3:2), 1152x1728 (2:3), 1920x1080 (16:9), +3
    use_2mpBOOLEANfalse
    res_3mpCOMBO1728x1728 (1:1)9 options: 1728x1728 (1:1), 2000x1496 (4:3), 1496x2000 (3:4), 2112x1408 (3:2), 1408x2112 (2:3), 2304x1296 (16:9), +3
    use_3mpBOOLEANfalse
    res_4mpCOMBO2048x2048 (1:1)9 options: 2048x2048 (1:1), 2304x1728 (4:3), 1728x2304 (3:4), 2448x1632 (3:2), 1632x2448 (2:3), 2688x1512 (16:9), +3
    use_4mpBOOLEANfalse
    batch_sizeINT11–64

    Outputs (3)

    NameTypeDescription
    latentLATENT
    widthINT
    heightINT