Nodes/NanoBananaComfyUI/Nano Banana Load Images (Ace Data Cloud)
ComfyUI Node

Nano Banana Load Images (Ace Data Cloud)

Four Nano Bananas in One Batch, and the Size Rule That Breaks It

By AceDataCloud·Created 3 days ago·Updated 2 days ago· 0
Nano Banana Load Images (Ace Data Cloud)
    • images
    ◄image_urls_json[]►

    Ask people why they went hunting for a third-party Nano Banana node instead of the built-in API template, and the answer is almost always the same: batch output. The complaint that spawned one of the more-upvoted nano banana node posts on r/comfyui was exactly "the current API node doesn't support batch image generation." Four variants in one run is the ask.

    This is the node that delivers it. Where Load Image takes one URL and gives you one image, AceNanoBananaLoadImages takes the URL array a finished task produces and gives you a proper IMAGE batch your upscaler or Save Image can chew through in one pass.

    How it works

    The input is a JSON array string, and it gets parsed strictly - a nonempty array of strings, or it raises. Each URL is downloaded and decoded the same way the single-image node does it: Ace CDN hosts only, 32 MiB ceiling, three retries, Pillow → float32 0–1. Then the decoded tensors are concatenated along the batch dimension into one [N, H, W, 3] tensor.

    The interesting line is the one after that. Before concatenating, the node collects the dimensions of every decoded image and demands exactly one distinct size. If they don't match, you get "Images have different sizes; load them one at a time." That's not the node being fussy - torch.cat would refuse anyway, and ComfyUI batches genuinely require uniform shapes. The node just fails with a sentence you can act on instead of a stack trace.

    Inputs and outputs

    • image_urls_json - multiline string, default []. This is the image_urls_json output from Retrieve Task or from Generate/Edit when a submission completes synchronously. Don't hand-type it; wire it. Pasting a single bare URL will raise, because a bare URL isn't a JSON array.
    • Output: images (IMAGE) - a batch, one entry per URL.

    Which means the practical recipe is: set count to 2, 3 or 4 on Generate, pick one model, one aspect_ratio and one resolution, and the array that comes back will be uniformly sized and will batch cleanly. Mix output from two different runs and you're loading them one at a time, which is what the single-image node is for.

    Install

    Manager → search Nano Banana, publisher acedatacloud, install, restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/AceDataCloud/NanoBananaComfyUI.git
    cd NanoBananaComfyUI
    python -m pip install -r requirements.txt
    

    One dependency (requests), no checkpoints, no GPU. Decoding uses ComfyUI's existing Pillow/NumPy/PyTorch. Set your key in the process environment, then restart:

    export ACEDATACLOUD_API_KEY='paste-your-key-here'
    python main.py
    

    Where people get burned

    "Images have different sizes; load them one at a time." Two causes, both common. Either you asked for count 4 across resolutions the model doesn't support at that ratio, or you're feeding URLs from separate generations with different settings. Regenerate as one task instead of gluing separate ones together.

    "Image URLs must be a nonempty JSON array of strings." Usually an empty Retrieve result - the task was still pending when you ran it, so image_urls_json came back []. Re-run the retrieve step, then load.

    Cost sneaks up on the count. A count-4 run is four paid images, every time you press Queue. There's no local sampler to re-roll for free, so nail your prompt before you batch - and note that the lookup path is free, which is why fixing a flat batch means retrieving again, not generating again.

    Batch semantics downstream. images behaves like any ComfyUI batch: Save Image writes one file per frame with an auto-incrementing counter, and most upscale nodes will happily process all four. If a downstream node only wants one, pull a single index off the batch rather than rerunning the node.

    CategoryAce Data Cloud/Nano Banana

    Inputs (1)

    NameTypeDefaultDescription
    image_urls_jsonSTRING[]—

    Outputs (1)

    NameTypeDescription
    imagesIMAGE—