Nodes/NanoBanana FaceSwap/Nano Banana - Face Swap (Mask Inpaint)
ComfyUI Node

Nano Banana - Face Swap (Mask Inpaint)

A ComfyUI node in NanoBanana FaceSwap with 32 inputs and 4 outputs.

By IxMxAMAR·Created 3 months ago·Updated 2 months ago· 2
Nano Banana - Face Swap (Mask Inpaint)
  • target_image
  • identity_1
  • identity_2
  • identity_3
  • identity_4
  • identity_5
  • identity_6
  • network
  • image
  • status
  • mask
  • debug_sheet
api_key
modelgemini-3.1-flash-image-preview
scopeface
grid_modeseparate_refs
custom_hint
safety_thresholdBLOCK_NONE
seed0
batch_axistarget
detectorauto
crop_size1024
mask_dilate_px25
mask_feather_px16
image_size2K
color_matchtrue
grain_matchtrue
sharpness_matchtrue
composite_methodlaplacian
match_directional_lightingfalse
lab_strength0.60
grain_strength1.00
dry_runfalse
timeout_ms180000
ref_cap_px1024
auto_relax_on_refusedfalse
CategoryNanoBanana FaceSwap

Inputs (32)

NameTypeDefaultDescription
api_keySTRING
modelCOMBOgemini-3.1-flash-image-preview3 options: gemini-3.1-flash-image-preview, gemini-3-pro-image-preview, gemini-2.5-flash-image
target_imageIMAGE
identity_1IMAGE
scopeCOMBOface3 options: face, head, head+styling
grid_modeCOMBOseparate_refs2 options: separate_refs, auto_sheet
custom_hintSTRING
safety_thresholdCOMBOBLOCK_NONE4 options: BLOCK_NONE, BLOCK_ONLY_HIGH, BLOCK_MEDIUM_AND_ABOVE, BLOCK_LOW_AND_ABOVE
seedINT00–2147483647
batch_axisCOMBOtarget2 options: target, identity
detectorCOMBOauto4 options: auto, mediapipe, opencv_yunet, gemini_bbox
crop_sizeINT1024256–2048
mask_dilate_pxINT250–128Dilate the face polygon outward before painting red. Higher = more room for Gemini to redraw bone structure. 25 is the tested default.
mask_feather_pxINT160–128Gaussian feather radius on the final composite mask edge.
image_sizeCOMBO2K3 options: 1K, 2K, 4K
color_matchBOOLEANtrueLAB color match with face-polygon stats.
grain_matchBOOLEANtrueSynthetic noise matched to target's cheek variance.
sharpness_matchBOOLEANtrueBlur Gemini's face if it's sharper than the body.
composite_methodCOMBOlaplacian2 options: laplacian, feather
match_directional_lightingBOOLEANfalseSame-character mode only. Corrupts identity in cross-identity swaps.
lab_strengthFLOAT0.600–1
grain_strengthFLOAT1.000–2
identity_2optIMAGE
identity_3optIMAGE
identity_4optIMAGE
identity_5optIMAGE
identity_6optIMAGE
dry_runoptBOOLEANfalse
timeout_msoptINT1800005000–600000
ref_cap_pxoptINT10240–4096
auto_relax_on_refusedoptBOOLEANfalse
networkoptNB_NETWORKOptional. Wire a NanoBanana - Network Route node here to route this swap's API call through that proxy (e.g. US egress).

Outputs (4)

NameTypeDescription
imageIMAGE
statusSTRING
maskMASK
debug_sheetIMAGE