Nodes/ComfyUI-Gemini3-API-Fallback/πŸ“ Aspect Ratio Selector (API Fallback)
ComfyUI Node

πŸ“ Aspect Ratio Selector (API Fallback)

The boring little node that keeps every Gemini image node at the same ratio

By LatentnautΒ·Created 7 months agoΒ·Updated 3 months agoΒ· 0
πŸ“ Aspect Ratio Selector (API Fallback)
    • aspect_ratio
    β—„aspect_ratioautoβ–Ί
    β—„aspect_ratio_inβ€”β–Ί

    The πŸ“ Aspect Ratio Selector doesn't draw anything. It exists so you don't have to reach into a dropdown inside every πŸ€– Gemini 3 Pro Image node and pick "16:9" each time. Set it once, wire its single output into however many image nodes you've got, and your whole batch stays consistent. When you later decide the whole set should be 21:9, you change one widget instead of hunting through ten nodes.

    It's a pure value node from the ComfyUI-Gemini3-API-Fallback pack - no API calls, no API keys, nothing leaves your machine. It just hands a string to the aspect_ratio input of the image-generation node, which is where the actual work happens.

    How it works

    The dropdown has twelve options: auto, the standard ratios (1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9), and one special entry called Aspect Ratio Input. Pick any named ratio and the node passes it straight through to the output.

    Aspect Ratio Input is the clever bit. Choose it and the node reads the optional aspect_ratio_in string input instead - so you can feed it a ratio from another node, a text field, or a workflow parameter. If you hand it a ratio that isn't in the supported list, like 5:7, the node snaps it to the closest standard option; anything unrecognizable falls back to auto (which means "let the model decide"). That auto-fallback is a nice safety net, but it's also the gotcha: a typo in your aspect_ratio_in quietly becomes a model-chosen ratio instead of an error.

    The fields that matter

    • aspect_ratio - the dropdown, the one thing you'll actually set. Defaults to auto.
    • aspect_ratio_in (optional) - a STRING input, only used when aspect_ratio is set to Aspect Ratio Input.

    Output: aspect_ratio, a single value that plugs into the aspect_ratio input of any Gemini 3 Pro Image node in the pack.

    Installing it

    The pack has no model files and needs no GPU - everything happens on Google's servers. Either install through ComfyUI Manager (search for "ComfyUI-Gemini3-API-Fallback") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Latentnaut/ComfyUI-Gemini3-API-Fallback
    python -m pip install google-genai pillow numpy requests
    

    then restart ComfyUI. The Aspect Ratio Selector doesn't need a Google API key itself - only the image node you connect it to does.

    When it's worth it

    If you're running one image node on auto, skip this node entirely - it's pure overhead. It earns its place when you have several Gemini image nodes in a workflow and you want them all locked to one ratio, or when you're automating and want the ratio to be a parameter instead of a hardcoded dropdown. For that job it's genuinely the right tool: small, predictable, and one knob for everything.

    CategoryGemini AI

    Inputs (2)

    NameTypeDefaultDescription
    aspect_ratioCOMBOauto12 options: Aspect Ratio Input, auto, 1:1, 2:3, 3:2, 3:4, +6
    aspect_ratio_inoptSTRINGβ€”

    Outputs (1)

    NameTypeDescription
    aspect_ratioAspect Ratio Input,auto,1:1,2:3,3:2,3:4,4:3,4:5,5:4,9:16,16:9,21:9β€”