Gemini Util - Options
One node to set your Gemini model and prompt style for the whole captioning chain
- gemini_options
Config nodes are the plumbing of any good workflow: they do nothing by themselves and make everything else manageable. Gemini Util - Options is exactly that - a single node that packages your Gemini choices so the captioning nodes downstream don't each need a wall of settings. It outputs one object, gemini_options, that MediaDescribe consumes directly.
Three choices, and all three are the ones you actually care about. gemini_model lets you pick from models/gemini-2.5-flash (the default), -flash-lite, or -pro. Flash is the sensible default for captioning - fast, cheap, and plenty good at describing images and videos. Flash-lite is there for when you're captioning in bulk and want to shave cost. Pro is for the cases where the caption quality genuinely matters more than the bill - harder to justify for routine captioning, but it's there. prompt_style is the interesting one: Text2Image generates descriptive prompts for models like FLUX Dev and SDXL, while ImageEdit flips the output into instruction form ("change this to…", "modify that…") for editing models like FLUX Redux/Kontext, Nano Banana, and Qwen Image Edit. Pick based on what your downstream model wants, not what sounds cooler. change_clothing_color (Yes/No) is a niche toggle that makes the description suggest clothing colors that harmonize with the scene rather than just reporting what's there - handy when you're regenerating characters and the exact original outfit color is working against you.
The mechanism is pure assembly. When the graph runs, this node grabs the Gemini API key from the pack's ComfyUI settings (with a fallback to the GEMINI_API_KEY environment variable), bundles it with your model and style choices, and hands the whole dict downstream. No network call, no key entry per node - you set the key once in Settings and this node carries it.
Installing
Ships with the whole pack:
- ComfyUI Manager: search "Swiss Army Knife", install, restart.
- Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/sammykumar/ComfyUI-SwissArmyKnife.git
cd ComfyUI-SwissArmyKnife
pip install -e .
The one thing to remember
The API key lives in the Swiss Army Knife settings in ComfyUI (or as GEMINI_API_KEY in the environment). If MediaDescribe downstream fails with an auth/empty-key error and you're sure you set the key, check that the setting actually saved - this node's job is carrying the key, but it can only carry what Settings gave it.
Worth it? Yes, but only as part of the Gemini pipeline. Standalone it's a blank node with three dropdowns. Connected to MediaDescribe it's the difference between swapping models by editing one dropdown versus rebuilding half your graph.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| gemini_model | COMBO | models/gemini-2.5-flash | Select the Gemini model to use |
| prompt_style | COMBO | Text2Image | Text2Image: Generates descriptive prompts for models like FLUX Dev, SDXL, etc. ImageEdit: Generates instruction prompts with words like 'change to...', 'modify this...' for image editing models like FLUX Redux/Kontext, Nano Banana, Qwen Image Edit |
| change_clothing_color | COMBO | No | If enabled, adjust clothing color descriptions to new colors that harmonize with the scene and differ from the original colors |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| gemini_options | GEMINI_OPTIONS | — |