Nodes/NanoBanana FaceSwap/Identity Sheet Composer
ComfyUI Node

Identity Sheet Composer

One grid of references beats six loose images for identity lock

By IxMxAMAR·Created 4 months ago·Updated about a month ago· 3
Identity Sheet Composer
  • identity_1
  • identity_2
  • identity_3
  • identity_4
  • identity_5
  • identity_6
  • sheet
  • layout_info
layoutauto
tile_size512

Nano Banana lets you hand a swap node up to six identity references, and the pack's default is to send them as separate images. But when you've got four or more angles of the same person, a single labeled grid is often the stronger signal - Gemini can read it holistically instead of reconciling scattered pictures. IdentitySheetComposer is the helper that builds that grid for you.

It's the pack's answer to the classic identity-preservation problem: one reference photo is never enough, and five photos in five different lighting conditions can confuse an edit model as easily as they help it. A composed sheet - front, side, three-quarter, same expression repeated - locks identity far better than the same images passed loose. If you're swapping a specific person repeatedly, this is the node that makes the second swap feel like cheating.

How it works

It takes your identity images, tiles them onto a grid at a fixed tile_size, and labels the layout so the sheet reads as a coherent reference packet rather than a collage. No API calls, no model download - it's pure Pillow composition happening locally. The swap nodes have a matching grid_mode=auto_sheet option that builds a sheet internally, but the Composer is the version that lets you see and control the grid first.

The inputs

  • identity_1 (required) plus identity_2 through identity_6 (optional) - up to six images. Order matters: the layout places them left-to-right, top-to-bottom, so front view first.
  • layout - auto figures out the grid from how many images you plugged in (that's the one to start with). The named layouts - 2x1, 1x2, 2x2, 3x2, 2x3, 1xN - are for when you want a specific shape, say a 3x2 for six angles.
  • tile_size (default 512) - each cell's edge in pixels. Each image is center-cropped to square and resized to this. Bigger cells give the model more face detail but make the total sheet larger; 512 is a fine default and ref_cap_px on the swap side keeps bandwidth sane anyway.

The outputs

Two: sheet, the composed grid IMAGE you wire into a swap node's identity_1 (or the grid_mode=auto_sheet alternative), and layout_info, a STRING describing the resolved layout - handy if auto picked something you didn't expect, like a 1xN when you wanted a square.

Install

Standard for this pack:

cd ComfyUI/custom_nodes
git clone https://github.com/IxMxAMAR/ComfyUI-NanoBanana-FaceSwap
cd ComfyUI-NanoBanana-FaceSwap
pip install -r requirements.txt

Restart ComfyUI, or grab it through ComfyUI Manager under "NanoBanana FaceSwap." It's in the same NanoBanana FaceSwap category as everything else. No API key required - this node never leaves your machine.

Gotchas

The one real gotcha is matching resolutions. The Composer center-crops everything to square tiles, so a tall portrait reference loses its top and bottom. If the reference face is unusually high or low in frame, the crop can cut the face off - drop the tile_size or re-crop the source before composing. Also remember layout_info is your check for auto: if you wanted a 2x2 but auto gave you a 1xN, you're passing a strip of images, not a square grid, and Gemini will read it differently.

CategoryNanoBanana FaceSwap

Inputs (8)

NameTypeDefaultDescription
identity_1IMAGE
layoutCOMBOauto7 options: auto, 2x1, 1x2, 2x2, 3x2, 2x3, +1
tile_sizeINT51264–2048
identity_2optIMAGE
identity_3optIMAGE
identity_4optIMAGE
identity_5optIMAGE
identity_6optIMAGE

Outputs (2)

NameTypeDescription
sheetIMAGE
layout_infoSTRING