Nodes/ComfyUI-OllamaGemini/FLUX Resolutions
ComfyUI Node

FLUX Resolutions

The aspect-ratio picker that stops FLUX from warping

By al-swaiti·Created 2 years ago·Updated 2 months ago· 185
FLUX Resolutions
    • width
    • height
    size_selected
    multiply_factor1
    manual_width0
    manual_height0

    You reach for this node so you never have to guess a width and height again. It's a dropdown of known-good image sizes - pick "1024x1024 (1:1) - Square Large" or "1152x768 (3:2) - Wide Small" from a menu that spells out the aspect ratio and rough use in plain English, and it spits out two plain integers you plug into your Empty Latent Image. That's the entire job. No model, no API, no key. Despite the "FLUX" in the name it's a glorified lookup table.

    Why it exists

    Diffusion models are picky about resolution in a way beginners always learn the hard way. SDXL was trained at a 1024-pixel budget across a fixed set of aspect-ratio buckets; FLUX is more flexible but still happiest on dimensions that are multiples of a decent number and near the resolution it saw in training. Wander too far off - an oddball 900x650, or something enormous like 2048x2048 in one shot - and you get the classic failure modes: duplicated heads, a subject cloned across the frame, stretched anatomy, or just mush. The FLUXResolutions dropdown is thirty presets that all sit inside the safe zone, labeled so you don't have to memorize which numbers are blessed. It's training wheels for the one setting people most often get wrong.

    How it works

    Each menu entry maps to a hard-coded width/height pair. Pick one and the node emits those two numbers. There's nothing clever underneath - the value is that someone already did the arithmetic and threw out the sizes that break.

    Two knobs let you go off-menu:

    • multiply_factor (default 1) - scales the chosen dimensions up by a whole number. Set it to 2 and a 1024x1024 preset becomes 2048x2048. Handy for a base pass you'll later downscale, but don't generate straight at 2x on FLUX and expect clean results; that's what upscalers are for.
    • manual_width / manual_height (both default 0) - an escape hatch. Leave them at 0 and the dropdown wins. Put real numbers in and they override the preset entirely, which quietly defeats the purpose of the node but is there when you need an exact custom size.

    The inputs and outputs that matter

    Honestly, you only touch size_selected. Pick the aspect ratio that fits your shot - portrait for a character, wide for a landscape, square for an avatar - and move on. The outputs are width and height, both integers. Wire them into the matching inputs of an Empty Latent Image node (or any node that takes a width and height). That's the standard hookup: this node sets the canvas, the rest of your graph paints on it.

    Installing it

    Grab it through ComfyUI Manager - open the Manager, search ComfyUI-OllamaGemini, install, restart. Or by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/al-swaiti/ComfyUI-OllamaGemini
    pip install -r requirements.txt
    

    then restart ComfyUI fully. This particular node needs no model files and no credentials, but you're installing the whole multi-provider pack to get it. If the pack's dependency install chokes on one of its SDKs, the entire thing fails to import and the node won't show up - so if it's missing after a restart, check your startup console for a red import error rather than hunting through the menu.

    Where people get burned

    Two things. First, multiply_factor is not an upscaler - cranking it just asks the model to generate at a resolution it doesn't like, which reintroduces the exact duplication artifacts the presets were avoiding. Generate at a sane size, then upscale in a separate step. Second, the dropdown values suit the SDXL/FLUX generation of models; if you're on something with different native resolutions, treat the labels as a starting point, not law. And remember the width/height are just numbers - the node has no idea which checkpoint you loaded, so pairing a "Square Large" with a model that wants portrait is entirely on you.

    CategoryAI API

    Inputs (4)

    NameTypeDefaultDescription
    size_selectedCOMBO30 options: 768x768 (1:1) - Square Medium, 768x1024 (3:4) - Portrait Small, 1024x768 (4:3) - Landscape Small, 1152x768 (3:2) - Wide Small, 768x1152 (2:3) - Portrait Medium, 1536x768 (2:1) - Ultra Wide Small, +24
    multiply_factorINT1
    manual_widthINT0
    manual_heightINT0

    Outputs (2)

    NameTypeDescription
    widthINT
    heightINT