π Aspect Ratio Selector (API Fallback)
The boring little node that keeps every Gemini image node at the same ratio
- aspect_ratio
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
STRINGinput, only used whenaspect_ratiois set toAspect 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.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| aspect_ratio | COMBO | auto | 12 options: Aspect Ratio Input, auto, 1:1, 2:3, 3:2, 3:4, +6 |
| aspect_ratio_inopt | STRING | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| aspect_ratio | Aspect Ratio Input,auto,1:1,2:3,3:2,3:4,4:3,4:5,5:4,9:16,16:9,21:9 | β |