Nodes/ComfyUI Assistant Node/PVL Google NanoBanana API
ComfyUI Node

PVL Google NanoBanana API

Nano Banana straight from Google — with a fal.ai parachute

By pvlprk·Created about a year ago·Updated 8 months ago· 1
PVL Google NanoBanana API
  • images
  • text
  • images
promptA tiny banana spaceship over a neon city.
seed0
modelgemini-2.5-flash-image-preview
output_formatpng
num_images1
retries3
timeout_sec120
debug_logfalse
capture_text_outputfalse
use_fal_fallbacktrue
force_falfalse
delimiter[++]
sync_modefalse
aspect_ratio1:1
endpoint_override
api_key
request_id
fal_api_key
fal_route_img2imgfal-ai/nano-banana/edit
fal_route_txt2imgfal-ai/nano-banana

Nano Banana is Google's own name for Gemini-native image generation - the rebrand of Gemini 2.5 Flash Image, so-called because the codename on a HuggingFace leaderboard stuck and Google leaned into it. You can't run it locally; the weights are closed and always have been. This node is the honest interface: it calls Google's API directly with gemini-2.5-flash-image-preview as the default model, and generates images from a text prompt (or edits them, if you connect images).

The bit that makes this node interesting rather than just a wrapper: use_fal_fallback defaults to on. When Google fails - rate limit, safety block, quota - the request routes to fal.ai's hosted Nano Banana instead (fal-ai/nano-banana for txt2img, fal-ai/nano-banana/edit for img2img), so your batch keeps producing. There's even a force_fal switch if you want to skip Google entirely. Two ways to reach the same closed model, and the node picks for you.

How it works

The node runs your prompt through Google's image model; with capture_text_output on, it also returns the model's text response as the text output. If force_fal is set, or a Google call fails and use_fal_fallback is on, it retries against fal with the routes in fal_route_txt2img / fal_route_img2img. A prompt written with [++] delimiters becomes multiple parallel generations - the delimiter splits your prompt into several calls whose results join back together, which is the pack's signature trick applied to image generation.

The inputs that matter

  • prompt - text-to-image instruction; the default is a tiny banana spaceship over a neon city, which tells you exactly what the author was testing with.
  • images (optional) - connect one and it becomes an edit (img2img) rather than a generation.
  • model - default gemini-2.5-flash-image-preview; type another model id to override.
  • num_images - 1 to 12 per run.
  • aspect_ratio - free-text, default 1:1; the code validates against a set that includes 21:9, 16:9, 4:3, 3:2, 2:3, 5:4, 4:5, 3:4, 9:16.
  • use_fal_fallback, force_fal, fal_api_key, fal_route_txt2img, fal_route_img2img - the resilience block. Set fal_api_key or export FAL_KEY for fallback to work.
  • api_key - blank uses GEMINI_API_KEY from the environment.
  • capture_text_output - returns the model's text alongside images.
  • seed, output_format (png/jpeg), retries, timeout_sec, debug_log, sync_mode, delimiter, endpoint_override, request_id.

Outputs: text (STRING) and images (IMAGE).

Installing it

Standard pack install:

cd ComfyUI/custom_nodes
git clone https://github.com/pvlprk/comfyui-pvl-api-nodes

Restart, export GEMINI_API_KEY and (for the fallback) FAL_KEY, or fill the fields. No model downloads - this whole node is API calls.

Common issues

The biggest reality check is the censorship. Nano Banana is heavily filtered - the community shorthand is "powerful but unimaginative," and a January 2026 policy tightening only made the image-safety filtering stricter. Prompts that sail through local models will come back blocked or sanitized, and a Google safety block is exactly the case the fal fallback was built to catch. Second, the fallback needs its own key: if use_fal_fallback is on but FAL_KEY is unset, the fallback can't engage. Third, watch the text output: it's empty unless capture_text_output is on, so don't wire text expecting a caption by default. And remember both legs bill you - Google and fal are separate accounts, and the fallback doesn't quietly eat the cost.

CategoryPVL/Google

Inputs (21)

NameTypeDefaultDescription
promptSTRINGA tiny banana spaceship over a neon city.
seedINT00–18446744073709550000
modelSTRINGgemini-2.5-flash-image-preview
output_formatCOMBOpng2 options: png, jpeg
num_imagesINT11–12
retriesINT31–10
timeout_secINT1205–600
debug_logBOOLEANfalse
capture_text_outputBOOLEANfalse
use_fal_fallbackBOOLEANtrue
force_falBOOLEANfalse
delimiterSTRING[++]
sync_modeBOOLEANfalse
imagesoptIMAGE
aspect_ratiooptSTRING1:1
endpoint_overrideoptSTRING
api_keyoptSTRING
request_idoptSTRING
fal_api_keyoptSTRING
fal_route_img2imgoptSTRINGfal-ai/nano-banana/edit
fal_route_txt2imgoptSTRINGfal-ai/nano-banana

Outputs (2)

NameTypeDescription
textSTRING
imagesIMAGE