Nodes/ComfyUI-nkxx/🍌 Nano Banana 异步提交 (Grsai)
ComfyUI Node

🍌 Nano Banana 异步提交 (Grsai)

The async submit half of the pair

By nkxx188·Created 11 months ago·Updated 6 months ago· 14
🍌 Nano Banana 异步提交 (Grsai)
  • image_1
  • image_2
  • image_3
  • image_4
  • status
prompt一只可爱的小猫
modelnano-banana-fast
image_size默认
concurrency1
aspect_ratioauto
api_key

Nano Banana is Google's Gemini-native image model, and it's good enough that a lot of people run it as the "closed first frame" in a workflow that animates with Wan or LTX locally. The catch is that the API can take a while, and a synchronous node that blocks your whole graph for thirty seconds is miserable. This node is the ComfyUI half that fixes that: it fires the job off to the Grsai reseller API, parks the task ID in a local database, and lets you go do other things. Its sibling, NanoBananaAsyncQuery, comes back later to collect the results.

You've got one job here - submit. The inputs that actually matter:

  • prompt - multiline, defaults to "一只可爱的小猫". This is a Gemini-native model, so natural language works well; it reads prompts semantically rather than as tag soup.
  • model - nano-banana-fast (the default and the cheap one), nano-banana-pro, nano-banana-pro-vt, nano-banana-pro-cl, nano-banana-2, and nano-banana-2-cl. Pro models map "默认" resolution to 2K, fast maps to 1K, so you don't have to think about it unless you want 4K.
  • image_size - 默认 / 1K / 2K / 4K. Note the -cl models are the character/consistency variants; at 4K the node quietly remaps nano-banana-2-cl to a dedicated nano-banana-2-4k-cl model on the backend.
  • concurrency - 1 to 10. This is how many separate jobs one run submits (each with a hair of invisible variation so the API doesn't dedupe them). Want ten variations of one prompt? Crank this.
  • aspect_ratio - auto, 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 5:4, 4:5, 21:9. Same list you'd see in ImageFX.
  • image_1 … image_4 - optional reference images, uploaded to Grsai before submission. This is your img2img/edit path.
  • api_key - leave blank to use the pack-wide key (see below).

The only output is a status string: your task is named 任务1, 任务2, … in the local database (grsai_banana_async_history.json under the pack's data/ folder), plus the model, subtask count, and your remaining credit balance. That task name is what the query node tracks.

One thing this pack does that most API wrappers don't: a circuit breaker. If it detects ten identical prompts submitted within ~15 seconds of each other - the classic Auto Queue foot-gun - it hard-stops and pops a ComfyUI error telling you to check your queue. That's a genuinely thoughtful touch; the README sells it as credit protection and it works.

Install is the pack-wide routine:

cd ComfyUI/custom_nodes
git clone https://github.com/jieg9341-lab/ComfyUI-nkxx

Restart ComfyUI - the pack auto-installs requests, pandas, openpyxl, yt-dlp, opencv-python, and aiohttp on first boot. If that silently fails, pip install them manually. You also need a Grsai key (apply at nkxx.grsai.ai); it goes in the node's api_key field, or set GRSAI_KEY as an environment variable, or use the pack's API Key Manager node.

Where people get burned: forgetting that async jobs cost credits even if you never query them, and leaving Auto Queue on while iterating a prompt (hello, circuit breaker). Also note the submit node is only half a workflow - if you wire it to nothing, your images sit in the database forever. Pair it with NanoBananaAsyncQuery and something to preview/save the returned image.

CategoryNkxx/Grsai/图像异步

Inputs (10)

NameTypeDefaultDescription
promptSTRING一只可爱的小猫
modelCOMBOnano-banana-fast6 options: nano-banana-fast, nano-banana-pro, nano-banana-pro-vt, nano-banana-pro-cl, nano-banana-2, nano-banana-2-cl
image_sizeCOMBO默认4 options: 默认, 1K, 2K, 4K
concurrencyINT11–10
aspect_ratioCOMBOauto11 options: auto, 1:1, 16:9, 9:16, 4:3, 3:4, +5
api_keyoptSTRING
image_1optIMAGE
image_2optIMAGE
image_3optIMAGE
image_4optIMAGE

Outputs (1)

NameTypeDescription
statusSTRING