Nodes/Ruucm's ComfyUI Nodes/Nano Banana Edit
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.

By ruucm·Created 2 years ago·Updated 5 months ago· 3
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)

NameTypeDefaultDescription
imageIMAGE
api_keySTRINGGoogle AI API key (from aistudio.google.com)
modelCOMBONano Banana 2 (Flash)2 options: Nano Banana 2 (Flash), Nano Banana Pro
output_qualityCOMBOoriginalOutput resolution. 'original' keeps the input size.
composite_modeCOMBOeyes_onlyfull: return entire edited image. eyes_only: paste only the eye region onto the original.
blend_radiusINT301–100Gaussian blur radius for eye region blending (eyes_only mode).
detect_modeCOMBOgeminigemini: use Gemini vision for gaze comparison. insightface: use local landmarks (free, less accurate).
compare_modelCOMBOgemini-2.5-pro (accurate, ~10 won)Model used for gaze comparison. Only used in gemini detect_mode.
gaze_thresholdFLOAT0.030–0.5Minimum gaze difference to trigger edit. Only used in insightface detect_mode.
max_retriesINT21–5Max edit attempts. After each edit, gaze is verified. If worse, retries from scratch. Only used with target_image.
save_debugBOOLEANfalseSave intermediate images and debug info to ruucm-comfy/debug_output/
target_imageoptIMAGETarget image whose gaze direction to match. If provided, gaze is compared and prompt is auto-generated.
promptoptSTRINGManual edit prompt. Ignored when target_image is connected.

Outputs (3)

NameTypeDescription
edited_imageIMAGE
used_promptSTRING
debug_infoSTRING