NanoBanana-GeneralAPI
One node to rule all the Nano Banana mirrors
- image
- image2
- image3
- image4
- text
- image
If you only install one node from ComfyUI_LLM_Banana, this is the one to consider. NanoBanana-GeneralAPI is the pack's universal image-generation-and-editing node: it can generate an image from text or edit up to four input images, through Google's official API or any of ~14 mirror sites, with a unified endpoint/auth system that the rest of the pack has now been aligned to. The README is explicit that Banana2-提示词模板 and Gemini-Multimodal share its design. Learn this node and the others start to look like variants.
It's a closed-model API node, so the usual rules apply (see the external-api-nodes KB doc): per-call cost, your data leaves the machine, Google's filter still applies no matter which mirror you use.
How it works
The config file Gemini_Banana_config.json defines the mirror_sites (nano-banana官方, comfly, Comfly-HK/US, Kuai, T8 variants, API4GPT, OpenRouter, Comet, aabao, custom), each with a URL and optional key. The node resolves settings by priority: your input → mirror-site config → global config → provider default. So you can leave api_key and base_url blank and let the selected mirror fill them in, or override everything yourself.
The endpoint builder and auth are the pack's core logic: if your base_url is already a full endpoint (.../models/<model>:generateContent) it's used as-is; otherwise it's assembled as base_url/<version>/models/<model>:generateContent (or appended to a /v1-style base). auth_mode=auto uses x-goog-api-key on Google domains and Authorization: Bearer elsewhere; google_xgoog and bearer force one or the other. version=Auto picks v1beta/v1alpha on Google and v1 on mirrors.
The inputs that matter
prompt- the generation/edit request (default: "生成一张清晰的香水产品图" - generate a clear perfume product image).mirror_site- the provider. Default nano-banana官方 (official Google). Pickcustomand you must fillapi_key+base_urlor it errors.api_key/base_url- override or let the mirror config supply them.model-gemini-3-pro-image-previeworcustom(then fillcustom_model).version,auth_mode- endpoint/header control, described above.response_mode-TEXT_AND_IMAGE/IMAGE_ONLY/TEXT_ONLY.aspect_ratio+image_size- geometry and 1K/2K/4K output.upscale_factor/gigapixel_model- Topaz Gigapixel hook (2x–6x).temperature/top_p/top_k/max_output_tokens/seed- sampling.strict_native- force the Gemini-native format (helps with mirrors that drift).system_instruction,image_mime(png/jpeg/webp),timeout,use_system_proxy- the rest.- Optional:
image…image4(for editing),extra_payload_json(raw JSON to merge into the request).
Outputs: text (STRING) and image (IMAGE).
Install
ComfyUI Manager → ComfyUI_LLM_Banana, or:
cd ComfyUI/custom_nodes
git clone https://github.com/xuchenxu168/ComfyUI_LLM_Banana
cd ComfyUI_LLM_Banana
pip install -r requirements.txt
Needs google-genai>=1.51.0. Restart.
Gotchas
The priority fallback can be confusing when things silently "work" with a config key you didn't intend - check the logs (the README tells you to watch Request URL and Request Headers) to confirm which endpoint and auth actually fired. strict_native is the escape hatch if a mirror returns format errors on the OpenAI path. And the image_size 4K option is the bill-inflator: drop to 1K for drafts. Mirrors churn, so if a site 404s, the fix is usually "pick a different mirror," not a config deep-dive.
Inputs (28)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | 生成一张清晰的香水产品图 | — |
| mirror_site | COMBO | nano-banana官方 | 15 options: nano-banana官方, comfly, Comfly-HK, Comfly-US, Kuai API, T8的贞贞AI工坊, +9 |
| api_key | STRING | — | |
| base_url | STRING | https://generativelanguage.googleapis.com | — |
| model | COMBO | gemini-3-pro-image-preview | 2 options: gemini-3-pro-image-preview, custom |
| custom_model | STRING | 当model选择'custom'时,在此输入自定义模型名称 | |
| version | COMBO | Auto | 4 options: Auto, v1, v1alpha, v1beta |
| auth_mode | COMBO | auto | 3 options: auto, google_xgoog, bearer |
| response_mode | COMBO | TEXT_AND_IMAGE | 3 options: TEXT_AND_IMAGE, IMAGE_ONLY, TEXT_ONLY |
| aspect_ratio | COMBO | Auto | 11 options: Auto, 1:1, 16:9, 9:16, 4:3, 3:4, +5 |
| image_size | COMBO | Auto | 4 options: Auto, 1K, 2K, 4K |
| upscale_factor | COMBO | 1x (不放大) | 使用Topaz Gigapixel AI进行智能放大 |
| gigapixel_model | COMBO | High Fidelity | Gigapixel AI放大模型 |
| temperature | FLOAT | 0.900–2 | — |
| top_p | FLOAT | 0.900–1 | — |
| top_k | INT | 401–1000 | — |
| max_output_tokens | INT | 20481–32768 | — |
| seed | INT | 00–2147483647 | — |
| strict_native | BOOLEAN | false | — |
| system_instruction | STRING | — | |
| image_mime | COMBO | image/png | 3 options: image/png, image/jpeg, image/webp |
| timeout | INT | 30030–600 | API请求超时时间(秒),默认300秒 |
| use_system_proxy | BOOLEAN | true | True=使用系统代理, False=禁用代理 |
| imageopt | IMAGE | — | |
| image2opt | IMAGE | — | |
| image3opt | IMAGE | — | |
| image4opt | IMAGE | — | |
| extra_payload_jsonopt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| image | IMAGE | — |