Nodes/ComfyUI-Google-AI-Studio/Google AI Studio Image Generator
ComfyUI Node

Google AI Studio Image Generator

Free Gemini images with no GPU at all

By BuffMcBigHuge·Created about a year ago·Updated 6 months ago· 11
Google AI Studio Image Generator
  • input_image
  • image
promptA beautiful landscape with mountains and a lake at sunset
api_key
modelgemini-3.1-flash-image-preview
negative_prompt
aspect_ratio1:1
safety_filter_levelBLOCK_MEDIUM_AND_ABOVE
person_generationALLOW_ALL

If you've watched the local model crowd measure every checkpoint against Google's Nano Banana and wished you could just try it, this node is the shortest path from "curious" to "generated an image." It drops Google's Gemini image models and Imagen right into a ComfyUI graph - no GPU, no checkpoint download, no LoRA to babysit. You trade VRAM for an API key and Google's quota. For most people that's a fair deal: the free-tier Gemini image models are genuinely good, and the node is one of the simplest ways to touch them without leaving ComfyUI.

The catch, and you should hear it up front: these are closed, hosted models with strict safety filtering, everything comes back with an invisible SynthID watermark, and there's no seed control - the API doesn't take one. This is the API lane, not the local lane. It's the thing you reach for when you want Nano Banana's prompt understanding or its surprisingly good text rendering, not when you want uncensored local control.

How it works

Under the hood the node runs two different code paths depending on the model you pick. For anything starting with gemini, it calls generate_content with image modality and - if you plug in an input_image - converts your tensor to a base64 PNG and sends it alongside the prompt, which is what makes image editing work. For imagen-* models it uses generate_images with the proper Imagen parameters. In both cases you get back a normal ComfyUI IMAGE tensor you can wire anywhere.

One thing worth knowing: Gemini has no native negative prompt parameter, so when you fill in negative_prompt on a Gemini model the node just appends Avoid: <your text> to the prompt. It works, but it's prompt engineering, not a real negative prompt. On Imagen it's a real parameter.

The inputs that matter

  • prompt - multiline, the actual generation or edit instruction.
  • model - defaults to gemini-3.1-flash-image-preview (Nano Banana 2), which is free tier. The imagen-4.0-* and imagen-3.0-fast-generate-001 options are paid tier and need billing set up on your API key.
  • input_image - optional; Gemini only. Plug in a IMAGE to edit it, or a whole batch to process multiple images in one API call.

The rest of the optional fields come with a warning baked into the UI itself: aspect_ratio, safety_filter_level, and person_generation are Imagen only and completely ignored by Gemini models. The tooltips say so explicitly, so if you set them on the default model and nothing changes, that's why.

Output is a single image (IMAGE), which plugs straight into PreviewImage, SaveImage, or any downstream node.

Installing it

ComfyUI Manager is the easy route - search for "Google AI Studio" and install. Or do it by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/BuffMcBigHuge/ComfyUI-Google-AI-Studio.git
cd ComfyUI-Google-AI-Studio
pip install -r requirements.txt

That requirements.txt is a single line - google-genai>=1.66.0. No models to download; everything happens server-side. Then grab a free API key from aistudio.google.com and restart ComfyUI. The node lives in the "Google AI Studio" menu.

Where people get burned

Free tier limits shift - Google has changed the daily Nano Banana quota more than once, and at times API access effectively required a billing account even for "free" models. If you start hitting quota errors on day one, that's usually it, not a bug. And the safety system is strict: "Request blocked" or a content-blocked error means Google refused, and no setting on this node changes that. It's a great tool for quick ideation and reference - just don't plan your whole pipeline around uncensored output, because that is exactly the fight you won't win here.

CategoryGoogle AI Studio

Inputs (8)

NameTypeDefaultDescription
promptSTRINGA beautiful landscape with mountains and a lake at sunset
api_keySTRINGYour Google AI Studio API key
modelCOMBOgemini-3.1-flash-image-preview7 options: gemini-3.1-flash-image-preview, gemini-3-pro-image-preview, gemini-2.5-flash-image, imagen-4.0-fast-generate-001, imagen-4.0-generate-001, imagen-4.0-ultra-generate-001, +1
input_imageoptIMAGEInput image for editing/modification (Gemini models only)
negative_promptoptSTRINGWhat you don't want in the image (works with all models)
aspect_ratiooptCOMBO1:1⚠️ IMAGEN ONLY - Completely ignored for Gemini models
safety_filter_leveloptCOMBOBLOCK_MEDIUM_AND_ABOVE⚠️ IMAGEN ONLY - Completely ignored for Gemini models (Gemini has its own safety system)
person_generationoptCOMBOALLOW_ALL⚠️ IMAGEN ONLY - Completely ignored for Gemini models

Outputs (1)

NameTypeDescription
imageIMAGE