Nodes/ComfyUI_LLM_Banana/🍌 Gemini Banana Multi Image Edit
ComfyUI Node

🍌 Gemini Banana Multi Image Edit

Multi-image editing on the official API, with consistency control

By xuchenxu168·Created about a year ago·Updated 10 months ago· 46
🍌 Gemini Banana Multi Image Edit
  • image1
  • image2
  • image3
  • image4
  • edited_image
  • response_text
◄api_key►
◄prompt请根据这些图片进行专业的图像编辑►
◄negative_prompt►
◄modelgemini-3-pro-image-preview►
◄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►
◄post_generation_controlrandomize►
◄enable_iterative_refinementfalse►
◄keep_last_turns3►
◄reset_conversationfalse►
◄lock_seedfalse►
◄enable_conversation_summaryfalse►
◄summary_injectionSystem Instruction►
◄summary_max_chars600►
◄custom_additions►
◄safety_leveldefault►
◄system_instruction_presetnone►
◄custom_system_instruction►

The single-image editor is great, but the thing people actually want from a Gemini image model is multi-image work: unify five product shots onto white backgrounds, apply one style across a character sheet, composite elements from several photos. That's this node - "🍌 Gemini Banana Multi Image Edit," the official-API version. It takes up to four image inputs plus a prompt and returns one edited image, and it ships a post_generation_control switch for how consistent that output should be across runs.

Mechanically it's the same Gemini generateContent image-edit call as the single-image node, just with multiple inline images in the request. The parts of a multi-image request that matter - how the model interprets "these images" and which one it edits - live in the prompt, and the built-in default is Chinese ("请根据这些图片进行专业的图像编辑", "please perform professional image editing based on these images"), which is a hint about the pack's primary audience. Rewrite it to be specific about which image does what, and you'll get dramatically better results.

The inputs that matter

  • api_key - official Google key (no mirror here; that's the sibling node).
  • image1 … image4 (optional) - the image wires. Wire what you need.
  • prompt / negative_prompt - the instructions. Be explicit about per-image roles.
  • model - gemini-3-pro-image-preview (default) or the 2.5-flash image models.
  • post_generation_control - randomize (default), maintain_consistency (keep results stable across runs), or enhance_creativity (looser, more variation). This plus seed/lock_seed is how you control reproducibility.
  • aspect_ratio, response_modality, output_resolution (Auto/1K/2K/4K) - output geometry and format.
  • upscale_factor / gigapixel_model - Topaz Gigapixel hook.
  • quality, style, detail_level, camera_control, lighting_control, template_selection - the photography presets.
  • temperature / top_p / top_k / max_output_tokens / seed - sampling. Note the seed max here is 999999, not the full 32-bit range of the single-image node.
  • enable_iterative_refinement - session-based refinement (keeps keep_last_turns of context, default 3); reset_conversation clears it.
  • Optional: custom_additions, safety_level (5 presets), system_instruction_preset (7), custom_system_instruction.

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. Needs google-genai>=1.51.0.

Gotchas

Multi-image calls are where attribution errors bite hardest - the same multi-subject weakness that plagues every VLM (the character-consistency and llm-in-comfyui KB docs). If you ask for one style across several photos, audit what actually happened before trusting it. And each call costs like a multi-image Pro request, which is more than single-image - batch deliberately, and use maintain_consistency + a fixed seed when you're iterating toward one result you actually want to keep.

CategoryKen-Chen/LLM-Nano-Banana

Inputs (36)

NameTypeDefaultDescription
api_keySTRING—
promptSTRING请根据这些图片进行专业的图像编辑—
negative_promptSTRING—
modelCOMBOgemini-3-pro-image-preview3 options: gemini-3-pro-image-preview, gemini-2.5-flash-image, gemini-2.5-flash-image-preview
aspect_ratioCOMBOAuto图像宽高比 (Gemini官方API支持)
response_modalityCOMBOTEXT_AND_IMAGE响应模式:TEXT_AND_IMAGE=文字+图像,IMAGE_ONLY=仅图像
output_resolutionCOMBOAuto (Model Default)🔥 仅 Nano Banana 2 (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–999999—
post_generation_controlCOMBOrandomize3 options: randomize, maintain_consistency, enhance_creativity
enable_iterative_refinementBOOLEANfalse启用迭代优化:自动保存会话历史,支持连续细化
keep_last_turnsINT31–10保留最近N轮对话作为上下文
reset_conversationBOOLEANfalse重置会话历史(清空所有历史记录和缓存)
lock_seedBOOLEANfalse锁定种子值:首次运行后固定seed,保持风格一致
enable_conversation_summaryBOOLEANfalse启用会话摘要:自动生成对话摘要,减少token消耗
summary_injectionCOMBOSystem Instruction摘要注入位置:System Instruction更稳定,Prompt Prefix更显式
summary_max_charsINT600100–2000摘要最大字符数
image1optIMAGE—
image2optIMAGE—
image3optIMAGE—
image4optIMAGE—
custom_additionsoptSTRING—
safety_leveloptCOMBOdefault内容安全过滤级别:default=API默认, strict=严格, moderate=中等, permissive=宽松, off=关闭
system_instruction_presetoptCOMBOnone系统指令预设模板,用于引导AI的行为和风格
custom_system_instructionoptSTRING—

Outputs (2)

NameTypeDescription
edited_imageIMAGE—
response_textSTRING—