ComfyUI Node

Gemini Web

Run Nano Banana in ComfyUI for free — if you trust it with your Google cookies

By Koko-boya·Created 8 months ago·Updated 6 months ago· 51
Gemini Web
  • image_1
  • image_2
  • image_3
  • image_4
  • image_5
  • image
  • response_text
  • thinking
modetext_to_image
promptGenerate a beautiful landscape
auth_methodauto_cookies
modelgemini-3-flash
timeout120
image_filterall
cookie_1PSID
cookie_1PSIDTS
debug_modefalse

GeminiWeb is a single node that puts Google's Gemini image model - the thing Google markets as Nano Banana - inside ComfyUI, with no API key, no billing account, and no GPU work. It doesn't call any paid API. It borrows your Google login and drives the same private endpoints that gemini.google.com uses when you type a prompt in the browser. That trick is the whole appeal, and it's also the whole risk, so read the security part before you wire it in.

The author built it to automate captioning their own dataset, released it "as-is," and said flat out it's experimental and unmaintained. It's not a polished ecosystem pillar like Impact Pack or rgthree. It's a clever, slightly sharp-edged tool that makes the Gemini image stack - text rendering and reference-image editing that genuinely beat most local models - available for the price of a Google account.

How it works

Under the hood is a vendored copy of HanaokaYuzu's Gemini-API library. On each run the node grabs your __Secure-1PSID and __Secure-1PSIDTS session cookies (from your browser, a file, or pasted values), exchanges them for an access token, then talks to the web app's endpoints over httpx. Because it's the web interface and not the API, output comes back the way the site returns it: every generation produces a watermarked PNG and a clean JPEG. The image_filter input picks which you want - all, no_watermark, or watermarked. Default is all.

One nice touch in the code: if a run returns no images, it falls back to a placeholder (or your input image in img2img/chat mode) instead of crashing the whole graph.

The inputs that matter

Three are required: mode (text_to_image, image_to_image, or chat), prompt, and auth_method. That last one is where you'll spend your setup time:

  • manual - paste your two cookie values into cookie_1PSID / cookie_1PSIDTS. The README's recommended route, and the most reliable on modern browsers.
  • cookie_file - reads the same values from gemini_cookies.txt in the node folder.
  • auto_cookies - tries to decrypt cookies straight from your browser. Only really works on Edge, and only if you run ComfyUI as Administrator to get past Chrome/Edge's v20 App-Bound Encryption.

Then the ones you'll actually touch: model (gemini-3-flash is the sensible default, with gemini-3-thinking and gemini-3-pro available), image_1 through image_5 for img2img reference images, and timeout if big prompts stall.

Outputs are image (a batched IMAGE tensor you feed straight into Preview or Save), plus response_text and thinking strings - the latter is Gemini's reasoning trace, handy in chat mode.

Install

Manager can find "Comfyui-GeminiWeb", or do it by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/Koko-boya/Comfyui-GeminiWeb.git
cd Comfyui-GeminiWeb
pip install -r requirements.txt

Then restart ComfyUI. Dependencies are light (httpx, orjson, loguru, Pillow, pydantic) and the __init__.py auto-installs the basics if they're missing. The heavy stuff - pywin32, pycryptodomex, PythonForWindows - only installs on Windows and only matters for auto_cookies. The node is AGPL-3.0 thanks to the vendored library, in case licensing matters to you.

Where people get burned

  • Security, seriously. This node reads your Google session cookies and stores them in plaintext, with SSL verification off. The top comment on the author's own Reddit launch thread was a warning to run it locally and never on a shared machine. Do that. Prefer manual or cookie_file over browser scraping.
  • "Cookie expired" - your session tokens rotate. Re-login to gemini.google.com and paste fresh values.
  • v20 App-Bound Encryption - the modern Chrome/Edge blocker. Skip the fight; use manual.
  • "No images generated" - the author's own tip: Gemini's web gen sometimes responds with text, so add "generate" to the prompt.
  • Region restrictions - image generation just isn't available in all regions. Nothing on your end fixes that.
  • If it's really broken, flip debug_mode on. It writes debug_request.txt in the node folder - but don't share debug_response.txt; it contains location and other personal data.

Set expectations: free Nano Banana access inside ComfyUI, but you're riding on a thin, unmaintained layer over an undocumented API that can change without notice. For one-off generations and rapid iteration it's fantastic. For anything you depend on, treat it as a toy until it proves otherwise.

CategoryGemini

Inputs (14)

NameTypeDefaultDescription
modeCOMBOtext_to_imageOperation mode
promptSTRINGGenerate a beautiful landscapeText prompt
auth_methodCOMBOauto_cookiesCookie source: auto_cookies (from browser), cookie_file (from gemini_cookies.txt), manual (paste values)
image_1optIMAGEInput image 1 (required for image_to_image)
image_2optIMAGEInput image 2 (optional reference)
image_3optIMAGEInput image 3 (optional reference)
image_4optIMAGEInput image 4 (optional reference)
image_5optIMAGEInput image 5 (optional reference)
modeloptCOMBOgemini-3-flashGemini model
timeoutoptINT12030–600API timeout in seconds
image_filteroptCOMBOallFilter: all=both, no_watermark=JPEG only, watermarked=PNG only
cookie_1PSIDoptSTRING__Secure-1PSID (manual)
cookie_1PSIDTSoptSTRING__Secure-1PSIDTS (optional)
debug_modeoptBOOLEANfalseSave request/response to debug files

Outputs (3)

NameTypeDescription
imageIMAGE
response_textSTRING
thinkingSTRING