ComfyUI Node
Nano Banana Edit
Edit an image using Google Nano Banana (Gemini) API. Connect a target_image to auto-match its gaze direction. Choose gemini (accurate) or insightface (free) for gaze detection. In 'eyes_only' mode, only the eye region is composited onto the original.
Nano Banana Edit
- image
- target_image
- edited_image
- used_prompt
- debug_info
◄api_key►
◄modelNano Banana 2 (Flash)►
◄output_qualityoriginal►
◄composite_modeeyes_only►
◄blend_radius30►
◄detect_modegemini►
◄compare_modelgemini-2.5-pro (accurate, ~10 won)►
◄gaze_threshold0.03►
◄max_retries2►
◄save_debugfalse►
◄prompt►
Categoryimage/ai
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| api_key | STRING | Google AI API key (from aistudio.google.com) | |
| model | COMBO | Nano Banana 2 (Flash) | 2 options: Nano Banana 2 (Flash), Nano Banana Pro |
| output_quality | COMBO | original | Output resolution. 'original' keeps the input size. |
| composite_mode | COMBO | eyes_only | full: return entire edited image. eyes_only: paste only the eye region onto the original. |
| blend_radius | INT | 301–100 | Gaussian blur radius for eye region blending (eyes_only mode). |
| detect_mode | COMBO | gemini | gemini: use Gemini vision for gaze comparison. insightface: use local landmarks (free, less accurate). |
| compare_model | COMBO | gemini-2.5-pro (accurate, ~10 won) | Model used for gaze comparison. Only used in gemini detect_mode. |
| gaze_threshold | FLOAT | 0.030–0.5 | Minimum gaze difference to trigger edit. Only used in insightface detect_mode. |
| max_retries | INT | 21–5 | Max edit attempts. After each edit, gaze is verified. If worse, retries from scratch. Only used with target_image. |
| save_debug | BOOLEAN | false | Save intermediate images and debug info to ruucm-comfy/debug_output/ |
| target_imageopt | IMAGE | Target image whose gaze direction to match. If provided, gaze is compared and prompt is auto-generated. | |
| promptopt | STRING | Manual edit prompt. Ignored when target_image is connected. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| edited_image | IMAGE | — |
| used_prompt | STRING | — |
| debug_info | STRING | — |