Nodes/ComfyUI-NanoBanana2/NanoBanana - Image Edit
ComfyUI Node

NanoBanana - Image Edit

A ComfyUI node in NanoBanana2/Image with 13 inputs and 1 output.

By IxMxAMAR·Created 5 months ago·Updated 2 months ago· 4
NanoBanana - Image Edit
  • image
  • mask
  • reference_image
  • reference_image_2
  • reference_image_3
  • network
  • image
api_key
modelgemini-3.1-flash-image-preview
custom_model
edit_instruction
system_instruction
aspect_ratioAUTO
image_sizeAUTO
CategoryNanoBanana2/Image

Inputs (13)

NameTypeDefaultDescription
api_keySTRINGNanoBanana - API key. Leave blank to use GEMINI_API_KEY env var.
modelCOMBOgemini-3.1-flash-image-previewImage-capable Gemini model for editing.
custom_modelSTRINGOverride with a custom model ID.
imageIMAGEThe image to edit.
edit_instructionSTRINGDescribe what edits to make to the image.
maskoptMASKOptional mask — which areas to edit. White = edit, black = keep. Works with any MASK source: SAM, Grounding DINO, segmentation, alpha channels, RMBG. Gemini doesn't do pixel-perfect masking — it uses this as visual guidance alongside your instructions.
reference_imageoptIMAGEOptional reference image (e.g., a face to swap into the masked region).
reference_image_2optIMAGEOptional second reference image.
reference_image_3optIMAGEOptional third reference image.
system_instructionoptSTRINGSystem instruction for the editing model.
aspect_ratiooptCOMBOAUTOOutput image aspect ratio.
image_sizeoptCOMBOAUTOOutput image resolution.
networkoptNB_NETWORKOptional. Wire a NanoBanana - Network Route node here to route this request through that proxy (e.g. US egress).

Outputs (1)

NameTypeDescription
imageIMAGE