Nodes/ComfyUI_LLM_Banana/🍌 Gemini Banana 镜像图像生成
ComfyUI Node

🍌 Gemini Banana 镜像图像生成

Text-to-image via Nano Banana, through the mirror of your choice

By xuchenxu168·Created 12 months ago·Updated 9 months ago· 46
🍌 Gemini Banana 镜像图像生成
    • image
    • response_text
    • grounding_info
    mirror_sitecomfly
    api_key
    promptA beautiful mountain landscape at sunset
    negative_prompt
    modelAuto (Latest Gemini 3 Pro) 🤖
    proxyNone
    aspect_ratioAuto
    response_modalityTEXT_AND_IMAGE
    output_resolutionAuto (Model Default)
    upscale_factor1x (不放大)
    gigapixel_modelHigh Fidelity
    qualityhd
    stylenatural
    detail_levelProfessional Detail
    camera_controlAuto Select
    lighting_controlAuto Settings
    template_selectionAuto Select
    temperature1.00
    top_p0.95
    top_k40
    max_output_tokens8192
    seed0
    custom_additions
    safety_leveldefault
    system_instruction_presetnone
    custom_system_instruction
    enable_google_searchfalse
    enable_iterative_refinementfalse
    keep_last_turns3
    reset_conversationfalse
    lock_seedfalse
    enable_conversation_summaryfalse
    summary_injectionSystem Instruction
    summary_max_chars600
    timeout300

    Text-to-image with Google's closed Nano Banana / Gemini image models, but without needing a Google billing account - that's this node in one line. "🍌 Gemini Banana 镜像图像生成" is the mirror-text-to-image twin of the official generation node. Same closed model behind it, same endpoint math, different door: you pick a mirror site (Comfly, T8, Kuai, API4GPT, OpenRouter, Comet, aabao…) and the node does the rest. The model can never be downloaded, so the API is the only path; the mirror exists to make that path cheap, region-accessible, and free of Google Cloud signup friction (the external-api-nodes KB doc walks through why that reseller layer exists).

    The default prompt is a sunset mountain landscape, the default model is an "Auto" pick of the latest Gemini 3 Pro, and the output is an image plus the model's text response.

    How it works

    It's the same generateContent machinery as the mirror edit node, minus the input image. The mirror_site dropdown is loaded from Gemini_Banana_config.json, and the node selects the correct endpoint format per model (Gemini-native generateContent for NB2, OpenAI-style paths on some providers for NB1 - the README's NB2 update spells out the branching). The Auto model entry inspects what your chosen mirror supports and picks the newest usable model.

    The inputs that matter

    • mirror_site - 15 presets (nano-banana官方, comfly, Comfly-HK/US, Kuai, T8 variants, API4GPT, OpenRouter, Comet, aabao, custom). Default comfly.
    • api_key - the mirror's key; falls back to the site config if blank.
    • prompt / negative_prompt - the generation request. No image input here; this is pure text-to-image.
    • model - Auto by default; otherwise pick from the 12 labeled options (note [Comfly-T8], [API4GPT], [OpenRouter] tags - the model must be served by your mirror).
    • aspect_ratio, response_modality, output_resolution (Auto/1K/2K/4K) - imageConfig controls.
    • upscale_factor / gigapixel_model - Topaz Gigapixel hook (2x–6x).
    • quality, style, detail_level, camera_control, lighting_control, template_selection - the photography presets.
    • temperature / top_p / top_k / max_output_tokens / seed - sampling.
    • enable_google_search (optional) - grounding; only meaningful on providers that support it.
    • timeout - seconds before giving up (default 300).

    Outputs: image (IMAGE), response_text (STRING), and grounding_info (STRING) when Google Search grounding is enabled. The image goes to preview/save; the text and grounding info are diagnostics.

    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 is editable in Gemini_Banana_config.json.

    Gotchas

    Same family rules as the mirror edit node: providers churn, "model not found" is the #1 complaint, and the Auto model pick is only as good as your mirror's roster. Keep timeout above a minute for busy providers - some of these mirrors queue. And remember the data-leaves-the-machine truth of the whole category: your prompts go to a third party whose logging you don't control, and no mirror removes Google's own content filter from the model, whatever they claim.

    CategoryKen-Chen/LLM-Nano-Banana

    Inputs (35)

    NameTypeDefaultDescription
    mirror_siteCOMBOcomfly15 options: nano-banana官方, comfly, Comfly-HK, Comfly-US, Kuai API, T8的贞贞AI工坊, +9
    api_keySTRING
    promptSTRINGA beautiful mountain landscape at sunset
    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 组合生成对应尺寸)。其他模型会忽略此参数。
    upscale_factorCOMBO1x (不放大)使用Topaz Gigapixel AI进行智能放大
    gigapixel_modelCOMBOHigh FidelityGigapixel AI放大模型
    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
    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_google_searchoptBOOLEANfalse🔍 启用 Google 搜索接地(Grounding with Google Search) ⚠️ 注意事项: 1. 仅支持 Nano Banana 2 模型(gemini-3-pro-image-preview) 2. 必须使用 TEXT_AND_IMAGE 响应模式(IMAGE_ONLY 不支持) 3. 仅支持使用 Gemini 原生格式的镜像站 4. 支持的镜像站: nano-banana官方、Comet、Kuai、Comfly(Gemini模型)、T8(Gemini模型) 5. 不支持: OpenRouter、API4GPT、Comfly/T8的nano-banana模型 💡 用途:根据实时信息(天气、新闻、事件等)生成图片
    enable_iterative_refinementoptBOOLEANfalse♻️ 启用迭代优化:通过多轮对话逐步细化图像 💡 开启后会保存对话历史,下次生成时作为上下文 ⚠️ 注意:会增加 token 消耗
    keep_last_turnsoptINT31–10保留最近 N 轮对话作为上下文(每轮包含用户+助手)
    reset_conversationoptBOOLEANfalse🔄 重置会话:清空历史对话、摘要和缓存,重新开始
    lock_seedoptBOOLEANfalse🔒 锁定 seed:首次运行时缓存 seed,后续运行自动使用相同 seed 保持风格一致 💡 配合迭代优化使用效果更佳
    enable_conversation_summaryoptBOOLEANfalse📝 启用会话摘要:自动生成对话摘要并注入,减少历史膨胀 💡 推荐与迭代优化一起使用
    summary_injectionoptCOMBOSystem Instruction摘要注入位置: • System Instruction - 更稳定、更隐形(推荐) • Prompt Prefix - 更显式、便于排查
    summary_max_charsoptINT600200–2000摘要最大字符数(建议 600-1000)
    timeoutoptINT30010–3600请求超时时间(秒),默认为300秒

    Outputs (3)

    NameTypeDescription
    imageIMAGE
    response_textSTRING
    grounding_infoSTRING