ComfyUI Node
π Nano Banana Chat Edit
A ComfyUI node in Google AI/Image Generation with 18 inputs and 3 outputs.
π 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)
| Name | Type | Default | Description |
|---|---|---|---|
| instruction | STRING | Describe the image you want to generate. Be specific about subject, style, lighting, composition. Supports multiple languages. | |
| model | COMBO | gemini-3.1-flash-image-preview | Nano Banana Pro = highest quality, best text rendering. Nano Banana 2 (Flash) = faster, cheaper, supports thinking & 512px & extreme aspect ratios. |
| aspect_ratio | COMBO | 1:1 | Output 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_size | COMBO | 1K | Output resolution. 512px (Flash only), 1K (1024px), 2K (2048px), 4K (4096px). Larger = higher quality but more tokens billed. |
| system_instruction | STRING | Persistent instruction that guides model behavior. Sits above the user prompt. Use for consistent style direction, persona, or constraints across generations. | |
| temperature | FLOAT | 1.000β2 | Controls 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_p | FLOAT | 0.950β1 | Nucleus 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_k | INT | 401β100 | Top-k sampling (1β100). Model considers only the K most probable tokens. Lower = more predictable, higher = more creative. |
| max_output_tokens | INT | 81921024β32768 | Max 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_level | COMBO | minimal | Reasoning depth (Flash/NB2 ONLY). Higher = better quality, more tokens. β οΈ IGNORED for Pro β causes API error if sent. |
| api_keyopt | STRING | Your Google AI Studio API key. Leave blank to use GEMINI_API_KEY environment variable. | |
| input_imageopt | IMAGE | β | |
| chat_historyopt | NANO_BANANA_CHAT_HISTORY | β | |
| safety_hate_speechopt | COMBO | BLOCK_NONE | Hate speech filter. BLOCK_NONE = most permissive. OFF = disabled. Note: an internal image filter may still block independently. |
| safety_harassmentopt | COMBO | BLOCK_NONE | Harassment filter. BLOCK_NONE = most permissive. OFF = disabled. |
| safety_sexually_explicitopt | COMBO | BLOCK_NONE | Sexually explicit filter β most common cause of blocked generations. BLOCK_NONE = most permissive configurable setting. |
| safety_dangerous_contentopt | COMBO | BLOCK_NONE | Dangerous content filter. BLOCK_NONE = most permissive. OFF = disabled. |
| enable_search_groundingopt | BOOLEAN | false | Google 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)
| Name | Type | Description |
|---|---|---|
| edited_image | IMAGE | β |
| response_text | STRING | β |
| chat_history | NANO_BANANA_CHAT_HISTORY | β |