🍌 Gemini Banana 镜像图片编辑
Same Gemini image editing, minus the Google billing account
- image
- edited_image
- response_text
The official Gemini Banana Image Edit node requires a Google API key, which means a Google Cloud/Vertex project and all the billing friction that comes with it. This node is the mirror twin: same image-edit job, but it routes through a reseller or mirror site - Comfly, T8, Kuai, API4GPT, OpenRouter, Comet, aabao - so you can pay with one key from a proxy instead of standing up a Google billing account. For a lot of users outside the US/EU, or anyone who wants looser billing and per-call rates, that's the entire reason this node exists (the reseller economics are covered in the external-api-nodes KB doc).
It's the "镜像图片编辑" node, the mirror sibling of the official editor, and mechanically it's the same Gemini generateContent call - just pointed at whichever endpoint you pick.
How it works
The mirror_site dropdown is loaded from Gemini_Banana_config.json (mirror_sites), and the node auto-selects the right endpoint per model. The README's NB2 update notes the important detail: Nano Banana 2 models go through Gemini-native generateContent, but some providers route NB1 and other models through OpenAI-style paths, so the node picks the format based on the model you chose. Pick custom if your provider isn't listed - but then you must fill both api_key and base_url yourself or it errors immediately.
The inputs that matter
mirror_site- 15 presets: nano-banana官方 (official, needs a real Google key), comfly, Comfly-HK/US, Kuai API, the T8 variants, API4GPT, OpenRouter, Comet, aabao, custom. Default is comfly.api_key- the mirror's key. Leave blank and it falls back to the mirror site's config.image,prompt,negative_prompt- the edit job itself. Default prompt: "Can you add a llama next to me?"model- 12 options with an "Auto (Latest Gemini 3 Pro) 🤖" default that picks the newest model your mirror supports. The dropdown labels which provider each model needs (e.g.nano-banana [Comfly-T8],gemini-2.5-flash-image-hd [API4GPT]).aspect_ratio,response_modality,output_resolution(Auto/1K/2K/4K) - the imageConfig controls.upscale_factor/gigapixel_model- the Topaz Gigapixel hook (2x–6x).quality,style,detail_level,camera_control,lighting_control,template_selection- the photography presets, same as the official node.temperature/top_p/top_k/max_output_tokens/seed- sampling.timeout- seconds before the call gives up (default 300). Mirror calls can be slow; don't set it too tight.- The optional block:
custom_additions,safety_level,system_instruction_preset,custom_system_instruction, and the iterative-refinement trio (enable_iterative_refinement,keep_last_turns,reset_conversation,lock_seed,auto_use_last_image, conversation summary).
Outputs: edited_image (IMAGE) and response_text (STRING).
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
Restart. The mirror list lives in Gemini_Banana_config.json - edit that file if you want to add your own providers.
Gotchas
Mirror providers come and go, and their model rosters drift from what the dropdown claims. The classic failure is "model not found" - check the model's provider label in the dropdown and confirm your mirror actually serves it. And a word of caution: a reseller still passes your prompt and image to Google's model, so the "looser filtering" some advertise is not a bypass, and your images are going to a third party. Use a throwaway key if you're not sure about a provider.
Inputs (36)
| Name | Type | Default | Description |
|---|---|---|---|
| mirror_site | COMBO | comfly | 15 options: nano-banana官方, comfly, Comfly-HK, Comfly-US, Kuai API, T8的贞贞AI工坊, +9 |
| api_key | STRING | — | |
| image | IMAGE | — | |
| prompt | STRING | Can you add a llama next to me? | — |
| negative_prompt | STRING | — | |
| model | COMBO | Auto (Latest Gemini 3 Pro) 🤖 | 12 options: Auto (Latest Gemini 3 Pro) 🤖, gemini-3-pro-image [Comet] 🔥NEW, gemini-3-pro-image-preview [All] 🔥NEW, google/gemini-3-pro-image-preview [OpenRouter] 🔥NEW, gemini-2.5-flash-image [All] ✓Stable, gemini-2.5-flash-image-preview [All] ✓Stable, +6 |
| proxy | STRING | None | — |
| aspect_ratio | COMBO | Auto | 图像宽高比 (Gemini官方API支持) |
| response_modality | COMBO | TEXT_AND_IMAGE | 响应模式:TEXT_AND_IMAGE=文字+图像,IMAGE_ONLY=仅图像 |
| output_resolution | COMBO | Auto (Model Default) | 🔥 仅 Nano Banana 2 (gemini-3-pro-image/gemini-3-pro-image-preview) 支持:通过 imageSize 参数直出 1K/2K/4K 分辨率(与 aspect_ratio 组合生成对应尺寸)。其他模型会忽略此参数。 |
| quality | COMBO | hd | 5 options: standard, hd, ultra_hd, ai_enhanced, ai_ultra |
| style | COMBO | natural | 18 options: None, vivid, natural, artistic, cinematic, photographic, +12 |
| detail_level | COMBO | Professional Detail | 5 options: None, Basic Detail, Professional Detail, Premium Quality, Masterpiece Level |
| camera_control | COMBO | Auto Select | 8 options: None, Auto Select, Wide-angle Lens, Macro Shot, Low-angle Perspective, High-angle Shot, +2 |
| lighting_control | COMBO | Auto Settings | 8 options: None, Auto Settings, Natural Light, Studio Lighting, Dramatic Shadows, Soft Glow, +2 |
| template_selection | COMBO | Auto Select | 14 options: None, Auto Select, Professional Portrait, Cinematic Landscape, Product Photography, Digital Concept Art, +8 |
| upscale_factor | COMBO | 1x (不放大) | 使用Topaz Gigapixel AI进行智能放大 |
| gigapixel_model | COMBO | High Fidelity | Gigapixel AI放大模型 |
| temperature | FLOAT | 1.000–1.5 | — |
| top_p | FLOAT | 0.950–1 | — |
| top_k | INT | 400–100 | — |
| max_output_tokens | INT | 81920–32768 | — |
| seed | INT | 00–268435455 | — |
| custom_additionsopt | STRING | — | |
| safety_levelopt | COMBO | default | 内容安全过滤级别:default=API默认, strict=严格, moderate=中等, permissive=宽松, off=关闭 |
| system_instruction_presetopt | COMBO | none | 系统指令预设模板,用于引导AI的行为和风格 |
| custom_system_instructionopt | STRING | — | |
| enable_iterative_refinementopt | BOOLEAN | false | ♻️ 启用迭代优化:通过多轮对话逐步细化图像 💡 开启后会保存对话历史,下次生成时作为上下文 ⚠️ 注意:会增加 token 消耗 |
| keep_last_turnsopt | INT | 31–10 | 保留最近N轮对话作为上下文(建议2~5) |
| reset_conversationopt | BOOLEAN | false | 重置当前节点的会话历史(基于 unique_id) |
| lock_seedopt | BOOLEAN | false | 🔒 锁定 seed:启用后,首次运行时使用当前 seed,后续运行自动沿用首次的 seed,保持风格一致。配合迭代优化使用效果最佳。 |
| auto_use_last_imageopt | BOOLEAN | false | 🖼️ 自动使用上一轮生成的图像:启用后,如果未连接输入图像,将自动使用本节点上一轮生成的图像作为输入。配合迭代优化实现连续细化。 |
| enable_conversation_summaryopt | BOOLEAN | false | 🧠 开启会话摘要:自动压缩历史对话为简短摘要,用于保持风格/约束一致性,降低token消耗 |
| summary_injectionopt | COMBO | System Instruction | 摘要注入位置:系统指令更稳定,提示词前缀更显式 |
| summary_max_charsopt | INT | 600100–2000 | 摘要长度上限(字符数) |
| timeoutopt | INT | 30010–3600 | 请求超时时间(秒),默认为300秒 |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| edited_image | IMAGE | — |
| response_text | STRING | — |