Nodes/ComfyUI_LLM_Banana/🍌 Gemini Banana 镜像图片编辑
ComfyUI Node

🍌 Gemini Banana 镜像图片编辑

Same Gemini image editing, minus the Google billing account

By xuchenxu168·Created 12 months ago·Updated 9 months ago· 46
🍌 Gemini Banana 镜像图片编辑
  • image
  • edited_image
  • response_text
mirror_sitecomfly
api_key
promptCan you add a llama next to me?
negative_prompt
modelAuto (Latest Gemini 3 Pro) 🤖
proxyNone
aspect_ratioAuto
response_modalityTEXT_AND_IMAGE
output_resolutionAuto (Model Default)
qualityhd
stylenatural
detail_levelProfessional Detail
camera_controlAuto Select
lighting_controlAuto Settings
template_selectionAuto Select
upscale_factor1x (不放大)
gigapixel_modelHigh Fidelity
temperature1.00
top_p0.95
top_k40
max_output_tokens8192
seed0
custom_additions
safety_leveldefault
system_instruction_presetnone
custom_system_instruction
enable_iterative_refinementfalse
keep_last_turns3
reset_conversationfalse
lock_seedfalse
auto_use_last_imagefalse
enable_conversation_summaryfalse
summary_injectionSystem Instruction
summary_max_chars600
timeout300

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.

CategoryKen-Chen/LLM-Nano-Banana

Inputs (36)

NameTypeDefaultDescription
mirror_siteCOMBOcomfly15 options: nano-banana官方, comfly, Comfly-HK, Comfly-US, Kuai API, T8的贞贞AI工坊, +9
api_keySTRING
imageIMAGE
promptSTRINGCan you add a llama next to me?
negative_promptSTRING
modelCOMBOAuto (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
proxySTRINGNone
aspect_ratioCOMBOAuto图像宽高比 (Gemini官方API支持)
response_modalityCOMBOTEXT_AND_IMAGE响应模式:TEXT_AND_IMAGE=文字+图像,IMAGE_ONLY=仅图像
output_resolutionCOMBOAuto (Model Default)🔥 仅 Nano Banana 2 (gemini-3-pro-image/gemini-3-pro-image-preview) 支持:通过 imageSize 参数直出 1K/2K/4K 分辨率(与 aspect_ratio 组合生成对应尺寸)。其他模型会忽略此参数。
qualityCOMBOhd5 options: standard, hd, ultra_hd, ai_enhanced, ai_ultra
styleCOMBOnatural18 options: None, vivid, natural, artistic, cinematic, photographic, +12
detail_levelCOMBOProfessional Detail5 options: None, Basic Detail, Professional Detail, Premium Quality, Masterpiece Level
camera_controlCOMBOAuto Select8 options: None, Auto Select, Wide-angle Lens, Macro Shot, Low-angle Perspective, High-angle Shot, +2
lighting_controlCOMBOAuto Settings8 options: None, Auto Settings, Natural Light, Studio Lighting, Dramatic Shadows, Soft Glow, +2
template_selectionCOMBOAuto Select14 options: None, Auto Select, Professional Portrait, Cinematic Landscape, Product Photography, Digital Concept Art, +8
upscale_factorCOMBO1x (不放大)使用Topaz Gigapixel AI进行智能放大
gigapixel_modelCOMBOHigh FidelityGigapixel AI放大模型
temperatureFLOAT1.000–1.5
top_pFLOAT0.950–1
top_kINT400–100
max_output_tokensINT81920–32768
seedINT00–268435455
custom_additionsoptSTRING
safety_leveloptCOMBOdefault内容安全过滤级别:default=API默认, strict=严格, moderate=中等, permissive=宽松, off=关闭
system_instruction_presetoptCOMBOnone系统指令预设模板,用于引导AI的行为和风格
custom_system_instructionoptSTRING
enable_iterative_refinementoptBOOLEANfalse♻️ 启用迭代优化:通过多轮对话逐步细化图像 💡 开启后会保存对话历史,下次生成时作为上下文 ⚠️ 注意:会增加 token 消耗
keep_last_turnsoptINT31–10保留最近N轮对话作为上下文(建议2~5)
reset_conversationoptBOOLEANfalse重置当前节点的会话历史(基于 unique_id)
lock_seedoptBOOLEANfalse🔒 锁定 seed:启用后,首次运行时使用当前 seed,后续运行自动沿用首次的 seed,保持风格一致。配合迭代优化使用效果最佳。
auto_use_last_imageoptBOOLEANfalse🖼️ 自动使用上一轮生成的图像:启用后,如果未连接输入图像,将自动使用本节点上一轮生成的图像作为输入。配合迭代优化实现连续细化。
enable_conversation_summaryoptBOOLEANfalse🧠 开启会话摘要:自动压缩历史对话为简短摘要,用于保持风格/约束一致性,降低token消耗
summary_injectionoptCOMBOSystem Instruction摘要注入位置:系统指令更稳定,提示词前缀更显式
summary_max_charsoptINT600100–2000摘要长度上限(字符数)
timeoutoptINT30010–3600请求超时时间(秒),默认为300秒

Outputs (2)

NameTypeDescription
edited_imageIMAGE
response_textSTRING