ComfyUI Node
Nano Banana - Face Swap (Crop & Composite)
A ComfyUI node in NanoBanana FaceSwap with 32 inputs and 4 outputs.
Nano Banana - Face Swap (Crop & Composite)
- 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►
◄scopehead►
◄grid_modeseparate_refs►
◄custom_hint►
◄safety_thresholdBLOCK_NONE►
◄seed0►
◄batch_axistarget►
◄detectorauto►
◄crop_size1024►
◄histogram_matchfalse►
◄feather_px24►
◄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)
| Name | Type | Default | Description |
|---|---|---|---|
| api_key | STRING | — | |
| model | COMBO | gemini-3.1-flash-image-preview | 3 options: gemini-3.1-flash-image-preview, gemini-3-pro-image-preview, gemini-2.5-flash-image |
| target_image | IMAGE | — | |
| identity_1 | IMAGE | — | |
| scope | COMBO | head | 3 options: face, head, head+styling |
| grid_mode | COMBO | separate_refs | 2 options: separate_refs, auto_sheet |
| custom_hint | STRING | — | |
| safety_threshold | COMBO | BLOCK_NONE | 4 options: BLOCK_NONE, BLOCK_ONLY_HIGH, BLOCK_MEDIUM_AND_ABOVE, BLOCK_LOW_AND_ABOVE |
| seed | INT | 00–2147483647 | — |
| batch_axis | COMBO | target | 2 options: target, identity |
| detector | COMBO | auto | 4 options: auto, mediapipe, opencv_yunet, gemini_bbox |
| crop_size | INT | 1024256–2048 | — |
| histogram_match | BOOLEAN | false | Legacy RGB histogram match. Superseded by color_match below; keep off unless debugging. |
| feather_px | INT | 240–256 | — |
| image_size | COMBO | 2K | 3 options: 1K, 2K, 4K |
| color_match | BOOLEAN | true | LAB color match with face-polygon stats. Fixes skin-tone cast. |
| grain_match | BOOLEAN | true | Add synthetic Gaussian noise matching the target's cheek variance. |
| sharpness_match | BOOLEAN | true | Blur Gemini's face if it's sharper than the body. Never sharpens. |
| composite_method | COMBO | laplacian | 2 options: laplacian, feather |
| match_directional_lighting | BOOLEAN | false | Same-character mode. Imposes the original face's lighting envelope on the new face. Corrupts identity for cross-identity swaps. |
| lab_strength | FLOAT | 0.600–1 | — |
| grain_strength | FLOAT | 1.000–2 | — |
| identity_2opt | IMAGE | — | |
| identity_3opt | IMAGE | — | |
| identity_4opt | IMAGE | — | |
| identity_5opt | IMAGE | — | |
| identity_6opt | IMAGE | — | |
| dry_runopt | BOOLEAN | false | Skip API call; return a structured preview of the prompt + parts. |
| timeout_msopt | INT | 1800005000–600000 | — |
| ref_cap_pxopt | INT | 10240–4096 | Downscale ref longest-edge to this px. 0=off. |
| auto_relax_on_refusedopt | BOOLEAN | false | On refusal, retry once with no safety_settings. |
| networkopt | NB_NETWORK | Optional. Wire a NanoBanana - Network Route node here to route this swap's API call through that proxy (e.g. US egress). |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| status | STRING | — |
| mask | MASK | — |
| debug_sheet | IMAGE | — |