Gemini
Free-tier captioning and prompt work via Google
- response
IsekaiGemini drops a Google Gemini call into your ComfyUI graph. You feed it a prompt, it calls the Gemini API, and a response string comes back - ready to wire into a text encoder, a save-anything metadata string, or another LLM node. It's the same genre as the pack's Claude node (cloud LLM in a workflow) with a different family: Gemini's free tier and cheaper pricing make it the node people pick when they want LLM assistance in a workflow without paying Anthropic rates for every caption.
How it works
Pure HTTP, no SDK. The node POSTs to Google's generativelanguage.googleapis.com endpoint with your prompt and pulls the text out of the candidates response. API key handling follows the pack's pattern: it checks the GOOGLE_API_KEY environment variable first, and only uses the api_key input field if the env var is empty. Set the env var once in your ComfyUI environment - don't bake keys into workflow JSON that might get shared.
Two model choices ship in the dropdown:
gemini-2.5-flash- the workhorse. Fast, cheap, good enough for captioning and prompt rewriting. This is the one to leave selected.gemini-3-pro-preview- a "preview" name, which should tell you something: model availability changes, and if Google retires or renames it, the dropdown will point at a dead model until the pack updates.
Temperature goes 0–2 (default 0.7 - note the range is wider than Claude's because Gemini's API allows it), and max_tokens runs up to 8192 (default 1000).
The inputs that matter
prompt- your user message. Required.model-gemini-2.5-flashorgemini-3-pro-preview.system_prompt- optional instructions, sent as Gemini'ssystemInstruction.api_key- fallback only; preferGOOGLE_API_KEY.temperature- 0–2, default 0.7.max_tokens- up to 8192, default 1000.
Output is response, a plain STRING.
Installing it
Part of isekai-comfy-node:
ComfyUI Manager: search "isekai" → install isekai-comfy-node → restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/isekai-sh/isekai-comfy-node
cd isekai-comfy-node
pip install -r requirements.txt
Restart and it's under Isekai → LLMs. Set GOOGLE_API_KEY before launching ComfyUI.
Common issues
Gemini has a security filter that Claude is more lenient about, and the node is honest about it in the logs: if a response gets filtered, you'll see SAFETY or RECITATION in the console and get an error string back. That's Google's policy doing its thing, not a bug - rephrase the prompt.
Also note the 60-second request timeout. With the gemini-3-pro-preview model and high max_tokens, slow responses can trip it. If you're hitting that, drop to flash or trim max_tokens.
If you're planning to pipe Gemini's output into a text encoder, same advice as any LLM-in-graph node: tell it in the system prompt to return only the text with no preamble. "Here is your caption:" showing up inside a prompt is a classic.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| model | COMBO | 2 options: gemini-2.5-flash, gemini-3-pro-preview | |
| system_promptopt | STRING | — | |
| api_keyopt | STRING | — | |
| temperatureopt | FLOAT | 0.70–2 | — |
| max_tokensopt | INT | 10001–8192 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| response | STRING | — |