Nodes/comfyui-nano-banana/🍌 Nano Banana Chat Edit
ComfyUI Node

🍌 Nano Banana Chat Edit

A ComfyUI node in Google AI/Image Generation with 18 inputs and 3 outputs.

By fwlemosΒ·Created 5 months agoΒ·Updated 5 months agoΒ· 0
🍌 Nano Banana Chat Edit
  • input_image
  • chat_history
  • edited_image
  • response_text
  • chat_history
β—„instructionβ–Ί
β—„modelgemini-3.1-flash-image-previewβ–Ί
β—„aspect_ratio1:1β–Ί
β—„image_size1Kβ–Ί
β—„system_instructionβ–Ί
β—„temperature1.00β–Ί
β—„top_p0.95β–Ί
β—„top_k40β–Ί
β—„max_output_tokens8192β–Ί
β—„thinking_levelminimalβ–Ί
β—„api_keyβ–Ί
β—„safety_hate_speechBLOCK_NONEβ–Ί
β—„safety_harassmentBLOCK_NONEβ–Ί
β—„safety_sexually_explicitBLOCK_NONEβ–Ί
β—„safety_dangerous_contentBLOCK_NONEβ–Ί
β—„enable_search_groundingfalseβ–Ί
CategoryGoogle AI/Image Generation

Inputs (18)

NameTypeDefaultDescription
instructionSTRINGDescribe the image you want to generate. Be specific about subject, style, lighting, composition. Supports multiple languages.
modelCOMBOgemini-3.1-flash-image-previewNano Banana Pro = highest quality, best text rendering. Nano Banana 2 (Flash) = faster, cheaper, supports thinking & 512px & extreme aspect ratios.
aspect_ratioCOMBO1:1Output image proportions. Pro supports 10 ratios. Flash supports 14 including extreme (1:8, 8:1). Invalid ratios for the selected model will be flagged.
image_sizeCOMBO1KOutput resolution. 512px (Flash only), 1K (1024px), 2K (2048px), 4K (4096px). Larger = higher quality but more tokens billed.
system_instructionSTRINGPersistent instruction that guides model behavior. Sits above the user prompt. Use for consistent style direction, persona, or constraints across generations.
temperatureFLOAT1.000–2Controls randomness (0.0–2.0). Lower = more predictable, higher = more creative. Google recommends keeping at 1.0 for Gemini 3 models β€” lower values may cause looping.
top_pFLOAT0.950–1Nucleus sampling (0.0–1.0). Model considers the smallest token set whose cumulative probability β‰₯ this value. Lower = more focused. Tip: adjust either temperature OR top_p, not both.
top_kINT401–100Top-k sampling (1–100). Model considers only the K most probable tokens. Lower = more predictable, higher = more creative.
max_output_tokensINT81921024–32768Max output tokens (text + thinking + image). Image tokens: ~1,120 for 1K, ~1,600 for 2K, ~2,520 for 4K. Too low = image may fail. Recommended minimum: 2048 for 1K, 8192 for 4K.
thinking_levelCOMBOminimalReasoning depth (Flash/NB2 ONLY). Higher = better quality, more tokens. ⚠️ IGNORED for Pro β€” causes API error if sent.
api_keyoptSTRINGYour Google AI Studio API key. Leave blank to use GEMINI_API_KEY environment variable.
input_imageoptIMAGEβ€”
chat_historyoptNANO_BANANA_CHAT_HISTORYβ€”
safety_hate_speechoptCOMBOBLOCK_NONEHate speech filter. BLOCK_NONE = most permissive. OFF = disabled. Note: an internal image filter may still block independently.
safety_harassmentoptCOMBOBLOCK_NONEHarassment filter. BLOCK_NONE = most permissive. OFF = disabled.
safety_sexually_explicitoptCOMBOBLOCK_NONESexually explicit filter β€” most common cause of blocked generations. BLOCK_NONE = most permissive configurable setting.
safety_dangerous_contentoptCOMBOBLOCK_NONEDangerous content filter. BLOCK_NONE = most permissive. OFF = disabled.
enable_search_groundingoptBOOLEANfalseGoogle Search grounding. Model searches web before generating for real-world accuracy. Flash supports web + image search; Pro web only. 5,000 free/month.

Outputs (3)

NameTypeDescription
edited_imageIMAGEβ€”
response_textSTRINGβ€”
chat_historyNANO_BANANA_CHAT_HISTORYβ€”