Nodes/ComfyUI-NanoBanana_node/Nano Banana (Pro) Node with Multiple Outputs
ComfyUI Node

Nano Banana (Pro) Node with Multiple Outputs

Batch image generation through Google's API

By darrell-goh·Created 9 months ago·Updated 7 months ago· 1
Nano Banana (Pro) Node with Multiple Outputs
    • IMAGE_1
    • IMAGE_2
    • IMAGE_3
    • IMAGE_4
    • IMAGE_5
    • Stats
    • Thoughts
    system_promptYou are a master artist and expert at digital art.
    user_message_boxCreate a sunset scene over the ocean with vibrant colors. --- Create a peaceful forest scene with morning mist.
    modelgemini-3-pro-image-preview
    num_outputs2
    use_same_prompttrue
    prompt_separator---
    image_generationtrue
    resolution4K
    aspect_ratioAuto
    temperature0.90
    timeout300

    The name suggests a local model. It isn't one. This is the parallel-output sibling of the Nano Banana (Pro) node in ComfyUI-NanoBanana_node, and what it actually does is fire up to five requests at Google's Gemini image models - the Nano Banana line - through the Vertex AI API, then hand you five image tensors back. No GPU grinding, no weights on disk, just a credit-card-sized bill from Google Cloud and a batch of variations in the time it'd take you to run one.

    Why reach for it? If you've ever sat in ComfyUI running the same prompt five times, tweaking the seed each time and squinting at which iteration is worth upscaling, this is the node that does that chore for you. Nano Banana itself is the family Google rebranded from Gemini-native image generation: the consumer-grade Flash model, the flagship Pro (4K native output, up to 14 reference images, a "thinking" step before it renders), and Nano Banana 2. The community verdict on the quality is mostly "impressive but unimaginative" - heavy safety filtering, invisible SynthID watermarks baked in - so this node is really for the jobs it's genuinely good at: clean edits, style transfer, text rendering, and high-volume variation.

    How it works

    Under the hood it's a thin HTTP client. Each of your num_outputs requests goes to Vertex AI's generateContent endpoint - either direct (aiplatform.googleapis.com with your project and location) or through a proxy if you set VERTEX_AI_USE_SIMPLE_ENDPOINT=true. The node fans the requests out with a thread pool (concurrent.futures), so they run in parallel, not in sequence: five outputs take roughly the same wall-clock time as one. It then decodes each image response into a tensor and routes it to the matching output slot.

    That's also where one of its quirks comes from. The node always exposes IMAGE_1 through IMAGE_5, but if you set num_outputs to 3, the last two slots get a 1×1 placeholder tensor instead of an image. Wire only the slots you expect to fill, or you'll be staring at a black pixel wondering what broke.

    The inputs that matter

    You don't touch most of these on a normal run, but a few you will:

    • user_message_box - your prompt. In variation mode (use_same_prompt on) it's one prompt used for all outputs. Turn that off and it splits on prompt_separator (default ---) so you can send three different prompts in one go.
    • num_outputs - 1 to 5, default 2. Remember each one is a separate paid API call.
    • model - whichever Gemini image model your .env's VERTEX_AI_MODELS exposes; defaults to gemini-3-pro-image-preview.
    • resolution and aspect_ratio - the Pro model is native 4K (4096×4096), so this genuinely changes your bill. aspect_ratio of Auto computes the ratio from your first input image; None just lets the API decide.
    • temperature - capped at 0.95 in variation mode. The node enforces this in code, so if you're not getting diversity, that's why.

    It also takes dynamic image_1 through image_N inputs - they appear as you connect images, for edit and multi-image-combine jobs, up to 14 for the Pro model or 6 for Flash. You may also spot the Stats and Thoughts outputs (STRING): token usage and the model's reasoning text.

    Installing it

    The pack installs like any custom node - via ComfyUI Manager (search "ComfyUI-NanoBanana_node") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/darrell-goh/ComfyUI-NanoBanana_node
    cd ComfyUI-NanoBanana_node
    pip install -r requirements.txt   # requests, aiohttp, tiktoken, Pillow, python-dotenv
    cp .env.template .env
    

    Then edit .env with your VERTEX_AI_API_KEY (plus project/location for direct Vertex, or VERTEX_AI_USE_SIMPLE_ENDPOINT=true plus an endpoint for a proxy), and restart ComfyUI. One trap: the README's own install block contains a leftover copy-paste error and tells you to clone gabe-init/ComfyUI-Openrouter_node - that's the upstream project this one was forked from, and it is not what you want. Clone the darrell-goh/ComfyUI-NanoBanana_node URL above.

    Gotchas

    The two that bite people hardest are money and empty slots. Five 4K Pro images is a genuinely different price than one - community numbers put Nano Banana Pro around $0.04–0.24 per image depending on resolution, so a maxed-out batch can clear a dollar a run. Also, "multiple outputs not varying" is almost always the temperature cap at 0.95 doing its job rather than a bug; if you want truly divergent results, try the separate-prompts mode instead. Missing key shows up as a VERTEX_AI_API_KEY not found error in the node's output. And if a request in the batch fails, you get a placeholder image and an error string in the Stats output while the others succeed - check Stats before you re-run the whole batch.

    If you just need one image, the single-output Nano Banana node is the simpler call. But for "show me five takes on this" - the whole reason this pack exists - this is the one.

    CategoryLLM

    Inputs (11)

    NameTypeDefaultDescription
    system_promptSTRINGYou are a master artist and expert at digital art.
    user_message_boxSTRINGCreate a sunset scene over the ocean with vibrant colors. --- Create a peaceful forest scene with morning mist.
    modelCOMBOgemini-3-pro-image-preview2 options: gemini-2.5-flash-image, gemini-3-pro-image-preview
    num_outputsINT21–5
    use_same_promptBOOLEANtrue
    prompt_separatorSTRING---
    image_generationBOOLEANtrue
    resolutionCOMBO4K3 options: 1K, 2K, 4K
    aspect_ratioCOMBOAuto12 options: None, Auto, 1:1, 4:3, 3:4, 16:9, +6
    temperatureFLOAT0.900–0.95
    timeoutINT30030–600

    Outputs (7)

    NameTypeDescription
    IMAGE_1IMAGE
    IMAGE_2IMAGE
    IMAGE_3IMAGE
    IMAGE_4IMAGE
    IMAGE_5IMAGE
    StatsSTRING
    ThoughtsSTRING