ComfyUI Node

Gemini (Soze)

Nano Banana, but inside your ComfyUI graph

By SozeInc·Created 7 months ago·Updated 4 months ago· 0
Gemini (Soze)
  • images
  • frames
  • audio
  • text
  • image
promptCreate a vivid word-picture representation of this image include elements that characterize the subject, costume, prop elemts, the action, the background, layout and composition elements present on the scene, be sure to mention the style and mood of the scene. Like it would a film director or director of photography
operation_modegenerate_images
model_namegemini-3-pro-image-preview
temperature0.80
thinking_levelminimal
media_resolution1K
video
system_prompt
seed0
sequential_generationfalse
batch_count1
aspect_rationone
external_api_key
bypassfalse
chat_modefalse
clear_historyfalse
structured_outputfalse
max_images6
max_output_tokens8192
use_random_seedfalse
api_call_delay1.0

The headline trick of this node is right in the defaults: drop it in a workflow, leave operation_mode on generate_images and model_name on gemini-3-pro-image-preview, and you're calling Gemini's flagship image model - the one Google rebranded as Nano Banana Pro - from your ComfyUI graph. No GPU, no checkpoint download, nothing local. Just a Google API key and an internet connection.

It's a single-node pack: "Gemini Node", displayed as Gemini (Soze) under the "Soze Nodes" category. SozeInc ported it from the long-running ComfyUI-IF_Gemini to talk to the Gemini 3.0 API, trimmed the Open Router support, and shared it back. The README is upfront that this started as a personal-use port - it's new, lightly tested, and does exactly one job. That job is genuinely handy.

What you'd use it for

Three modes, one node:

  • generate_images - text-to-image (or reference-image-to-image) with Gemini's native image generation. Wire the image output to a Save Image node and you're done. It also means the output is a real ComfyUI tensor, so you can run it through an upscaler or a detailer the way you would any other generated frame.
  • analysis - feed an image in, get a text description out. The default prompt is literally an image-to-prompt describer ("describe this as a film director would"). Pipe an image in, grab the text output, feed it to a KSampler - that's the classic IF_Gemini workflow, and it's still the best reason to install this.
  • generate_text - plain LLM chat/response mode for a system prompt plus your instruction.

How it works

Under the hood it's the google-genai SDK doing a network call on every queue. The node resolves your API key in order: GEMINI_API_KEY environment variable, then your .zshrc/.bashrc exports, then .env files in a few locations, then whatever you paste into external_api_key. There's a Verify API Key button on the node that hits the pack's /gemini/check_api_key route so you don't discover a bad key mid-run.

The inputs that actually matter

  • operation_mode - analysis, generate_text, or generate_images. Start here.
  • prompt - your instruction. Multiline, and it's pre-filled with the image-description prompt, which trips people up in generate_images mode; replace it.
  • model_name - the six-model list, defaulting to gemini-3-pro-image-preview. If you pick a text-only model while in generate_images mode, the code silently swaps you back to the image model - helpful, but don't be surprised when your choice is ignored.
  • thinking_level - minimal/low/medium/high controls how much Gemini "thinks" before answering (Gemini 3 only). high is slow and pricier; leave it on minimal unless you want the reasoning depth.
  • images (optional) - reference images for style-based generation or analysis. max_images caps how many get sent (default 6).
  • aspect_ratio, media_resolution, batch_count, seed - aspect presets, 1K/2K/4K output, up to 20 images per run, and a seed for repeatability.

Outputs are text (STRING) and image (IMAGE). In analysis/text modes, image is just a placeholder.

Installing it

ComfyUI Manager search "comfyui_soze_gemini" (it's on the Comfy Registry under publisher sozeinc), or:

cd ComfyUI/custom_nodes
git clone https://github.com/SozeInc/ComfyUI_Soze_Gemini
cd ComfyUI_Soze_Gemini
pip install -r requirements.txt

Restart ComfyUI. The dependency list is light - google-genai, google-generativeai, python-dotenv, plus torch/Pillow you already have. No model files. The real prerequisite is a key from aistudio.google.com/apikey.

Where people get burned

  • It costs real money. Nano Banana Pro is billed per image - roughly $0.04 up to $0.24 depending on resolution. batch_count at 4K can eat a couple of dollars in one run. Keep an eye on the meter.
  • The censorship is server-side. The code sets BLOCK_NONE on safety categories, but Google still enforces its IMAGE_SAFETY policy on the API; "Powerful, unimaginative, massive hidden biasing" is the community's summary. If a run returns a safety error, reword the prompt - the README says so too. It's not the node being broken.
  • Every image carries an invisible SynthID watermark. Fine for personal work, worth knowing before you ship something commercial.
  • Quota and key errors return as text output. If your text output suddenly says "ERROR: API quota exceeded" or "No Gemini API key found", that's the node talking to you, not a crash. The Verify button sorts out which.
  • The pack is a young personal port, and exactly one node ships - the prompt-manager helpers that shipped in IF_Gemini are commented out here. Don't expect polish, expect "works".

The name is a mouthful and the pack is barely a week old, but if you want Nano Banana generations or an image-to-prompt step inside ComfyUI without standing up a separate service, this is the node to reach for.

CategorySoze Nodes

Inputs (24)

NameTypeDefaultDescription
promptSTRINGCreate a vivid word-picture representation of this image include elements that characterize the subject, costume, prop elemts, the action, the background, layout and composition elements present on the scene, be sure to mention the style and mood of the scene. Like it would a film director or director of photography
operation_modeCOMBOgenerate_images3 options: analysis, generate_text, generate_images
model_nameCOMBOgemini-3-pro-image-preview6 options: gemini-3-pro-image-preview, gemini-3.1-pro-preview, gemini-3.1-flash-image-preview, gemini-3.1-flash-lite-preview, gemini-3-flash-preview, gemini-3-pro-preview
temperatureFLOAT0.800–1
thinking_levelCOMBOminimal4 options: minimal, low, medium, high
media_resolutionCOMBO1K3 options: 1K, 2K, 4K
imagesoptIMAGE
videooptSTRING
framesoptIMAGE
audiooptAUDIO
system_promptoptSTRING
seedoptINT00–4294967295
sequential_generationoptBOOLEANfalse
batch_countoptINT11–20
aspect_ratiooptCOMBOnone11 options: none, 1:1, 2:3, 3:2, 3:4, 4:3, +5
external_api_keyoptSTRING
bypassoptBOOLEANfalse
chat_modeoptBOOLEANfalse
clear_historyoptBOOLEANfalse
structured_outputoptBOOLEANfalse
max_imagesoptINT61–16
max_output_tokensoptINT81921–32768
use_random_seedoptBOOLEANfalse
api_call_delayoptFLOAT1.00–60

Outputs (2)

NameTypeDescription
textSTRING
imageIMAGE