ComfyUI Node

Nano Banana

You Can't Download It, So You Call It

By felipederosilva·Created about a month ago·Updated a day ago· 3
Nano Banana
    • image
    • url
    • all_urls_json
    • task_id
    • raw_json
    • credits_consumed
    • credits_left
    ◄promptA surreal painting of a giant banana floating in space, stars and galaxies in the background, vibrant colors, digital art►
    ◄output_formatpng►
    ◄aspect_ratio1:1►
    ◄image_size1:1►
    ◄nsfw_checkerfalse►
    ◄timeout_seconds1200►
    ◄callback_url►

    Why this node exists

    Nano Banana is Google's Gemini-family image model - the codename that leaked from a leaderboard, got adopted by Google's own executives, and stuck. The important property for a ComfyUI user isn't quality, it's that there are no weights. You cannot download it, quantize it, or run it on a 4090. If you want it in your graph, you call it.

    That's what this node is: a text-to-image node in the KIE Next/Image/Google/Nano Banana folder that sends your prompt to KIE.ai and hands the result back as a normal IMAGE. Nothing runs locally, nothing eats VRAM, and there is no free tier - every run spends credits.

    Why KIE rather than ComfyUI's official API nodes? Cost. The official partner route for Nano Banana-class models has been measured by users at roughly double the reseller price at 1K and 2K, and much steeper at 4K, and people building high-volume workflows noticed. Resellers also solve the two problems the first-party API creates for a lot of users: region availability and billing friction. The tradeoffs are honest ones - you're routing through a third party, the official route is the vetted one, and both send your prompt and your images to a server you don't control.

    How the pack drives it

    Node classes are generated at startup from KIE's published API docs. This node's market model id is google/nano-banana, and its class name ends in a hash (KIE_Next_google_nano_banana_9f1db6ec) that the pack derives from the model id plus its documentation URL, so the ID survives pack updates.

    On run, the pack POSTs to KIE's createTask endpoint, then polls recordInfo until the task comes back successful, downloads the image, and converts it to a tensor. Transient HTTP failures get retried with backoff. If KIE marks a task successful a moment before the result URL is actually readable, the pack keeps polling for a short grace period rather than failing a generation you already paid for.

    The inputs

    prompt is required, multiline, 5000 characters max. Default is the KIE documentation's surreal floating-banana example - swap it.

    aspect_ratio has eleven choices: 1:1, 9:16, 16:9, 3:4, 4:3, 3:2, 2:3, 5:4, 4:5, 21:9, and auto. auto lets the model decide from the prompt, which is fine for exploration and annoying when you're assembling a layout.

    output_format is just png or jpeg. PNG if you're going to keep editing it; jpeg if you're feeding it into something that only cares about pixels.

    image_size is the one to be careful with. Its own tooltip says it "has been replaced by aspect_ratio; please use the latest aspect_ratio parameter" - it's a deprecated field kept for compatibility. Set aspect_ratio and leave image_size alone. If a workflow you downloaded behaves strangely, this is often why.

    nsfw_checker is a boolean with one of the more confusing tooltips in the pack. Read the author's text closely: setting it to false disables KIE's content filtering so results come straight from the model, and the tooltip explicitly warns there's no guarantee anything gets filtered out anyway. It is a switch on the reseller's moderation layer, not a promise about what you'll get back - and it doesn't touch whatever moderation Google's own endpoint applies. Don't treat it as a content policy escape hatch.

    timeout_seconds (default 1200, range 30–7200) is the polling budget. Nano Banana calls are typically tens of seconds, so the default is generous; lower it if you'd rather fail fast in a batch.

    callback_url is for server-side push notifications. Leave it empty in ComfyUI.

    Outputs

    image is the tensor - straight into Save Image, a preview, or an upscale chain. url is the KIE-hosted file; all_urls_json is the full list of URLs the task returned; task_id is your receipt for support tickets; raw_json is the provider response you'll want open in a tab when something's off; credits_consumed and credits_left tell you what it cost.

    That all_urls_json output matters more than it looks. The image socket gives you a single tensor from the first usable URL, so if an endpoint ever returns multiple images the extras only exist in the JSON. People who generate grids in one call - a 2×2 or 3×3 sheet, then slice it downstream - lean on exactly this.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/felipederosilva/ComfyUI-KIE-Nodes-Next
    pip install -r requirements.txt
    

    Restart ComfyUI, then set your key once at Settings → KIE.ai Nodes Next → Connection → Paste / replace KIE.ai API key. The key is validated before it's saved, and afterwards you only ever see a masked fingerprint. KIE_API_KEY in the environment overrides the saved key for headless boxes. Dependencies are requests, Pillow, numpy, PyYAML - no model downloads, no CUDA. The README ships a Windows one-click installer and a ZIP in dist/, but Registry/Manager publishing is described as "prepared" rather than complete, so if Manager doesn't find the pack, clone it instead.

    Troubleshooting

    The node isn't in the menu. The pack builds most of its library from a live catalog sync on first launch. Restart once, or use the pack's Refresh Model Catalog node.

    "No KIE API key configured." The error means what it says. Settings → Connection, paste, save, confirm CONNECTED.

    A refusal you didn't expect. The filter belongs to the model, not the node. There's nothing to disable locally and a reseller can't strip it - Google's moderation still runs on the other end.

    Don't blindly re-run a timeout. Credit spend happens on submission. Check the task id before paying twice.

    CategoryKIE Next/Image/Google/Nano Banana

    Inputs (7)

    NameTypeDefaultDescription
    promptSTRINGA surreal painting of a giant banana floating in space, stars and galaxies in the background, vibrant colors, digital artThe prompt for image generation (Max length: 5000 characters)
    output_formatoptCOMBOpngOutput format for the images
    aspect_ratiooptCOMBO1:1Radio description
    image_sizeoptCOMBO1:1The aspect ratio of the generated image (this parameter has been replaced by aspect_ratio; please use the latest aspect_ratio parameter).
    nsfw_checkeroptBOOLEANfalseDefaults to false. You can set it to false based on your needs. If set to false, our content filtering will be disabled, and all results will be returned directly by the model itself. Note: There is no guarantee that everything can be filtered out; if you are not satisfied with the results, you will need to make your own arrangements.
    timeout_secondsoptINT120030–7200—
    callback_urloptSTRINGOptional KIE callback URL. Leave empty for normal ComfyUI use.

    Outputs (7)

    NameTypeDescription
    imageIMAGE—
    urlSTRING—
    all_urls_jsonSTRING—
    task_idSTRING—
    raw_jsonSTRING—
    credits_consumedFLOAT—
    credits_leftFLOAT—