Nodes/comfyui-character-swap/Multi Reference Shot (Nano Banana Pro)
ComfyUI Node

Multi Reference Shot (Nano Banana Pro)

Grade From One Photo, Light From Another, Your Character in the Middle

By haristahir1·Created a day ago·Updated a day ago· 0
Multi Reference Shot (Nano Banana Pro)
  • character
  • character_2
  • look_reference
  • lighting_reference
  • composition_reference
  • wardrobe
  • IMAGE
  • final_prompt
  • diagnostics
backendVertex AI (gcloud or service account)
modelgemini-3-pro-image-preview
seed42
aspect_ratioauto (match reference)
resolution2K
shot_description
camera_notes
lighting_notes
blocking_notes
character_notes
wardrobe_notes
do_notno text, no watermark, no extra people, no duplicated or cloned person, no collage, no grid, no split frame, no border
api_key
timeout300

Sometimes no single photo is the shot. You want the grade off this one, the key light off that one, the framing off a third, and your character in the middle - a shot that never existed, assembled from parts.

You can do that with a pile of images and a paragraph of prompt, and it works right up until it doesn't - usually by collapsing into a copy of whichever reference was strongest. Multi Reference Shot is the sibling of the pack's Character Swap node, built for that failure.

Same caveats as the rest of the pack: a Google API call on your own billing, in a pack with essentially no community track record yet.

How it works

Every image goes in with a label that says what it's for and what it is not for. The lighting label doesn't just claim the light - it ends with take nothing else from it: not its framing, not its colour grade, not its people, not its set. That second clause is load-bearing: without it a lighting reference drags its whole scene in, and that's the standard way multi-reference prompts become a copy of one input.

Your references get one job each: look_reference supplies grade, palette, contrast, black level, grain; lighting_reference supplies key direction, hardness, fill ratio, rim and falloff; composition_reference supplies shot size, camera height, angle, lens and where the subject sits. References can and do disagree - a dark grade against a bright lighting setup - and the node handles that by ranking instead of averaging: a directive at the end of the request fixes the order as written notes, then the character's face, then composition, lighting, look. Unranked, the model splits the difference and you get neither.

The direction lives in separate boxes - shot_description, camera_notes, lighting_notes, blocking_notes, character_notes, wardrobe_notes, do_not - rather than one long paragraph, because camera direction buried mid-paragraph competes with everything around it.

The inputs that matter

Everything except backend, model, seed, aspect_ratio and resolution is optional, and an unconnected input sends nothing - no label, no tokens, no influence. Connect only character and it behaves as a straight text-to-image node.

  • character - the person. Batch several angles here; more angles hold a likeness better than one portrait. character_2 is a second, distinct person when the shot needs one, and the labels explicitly forbid blending the two faces.
  • composition_reference - the only input aspect_ratio: auto reads. Look and lighting references can be any shape at all, so neither is asked. character, look_reference, lighting_reference and wardrobe complete the set.
  • shot_description - what's happening and where. The other notes are one job each; use them that way.

do_not here is pre-filled with the clone-and-collage blockers (no text, no watermark, no extra people, no duplicated or cloned person, no collage, no grid, no split frame, no border) - unlike the Character Swap node, where you paste them yourself.

Outputs are IMAGE (needs a SaveImage/PreviewImage - not an output node), final_prompt and diagnostics. final_prompt shows the interleaved request, labels and image counts included; diagnostics reports requested-vs-used aspect and the safety flags. Google returns 200 even when it has quietly swapped a face out, so that string is the difference between a bad prompt and a refusal.

Install

Manager: search the pack title. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/haristahir1/comfyui-character-swap

No requirements.txt - requests/torch/numpy/Pillow are already in ComfyUI. Vertex AI wants google-auth, declared in pyproject.toml, so Manager handles it; on a manual clone: python_embeded\python.exe -m pip install google-auth.

Vertex is the recommended backend and the only one that can spend Google's Cloud trial credit, because Gemini API on AI Studio is excluded from it. Both gcloud logins are required:

gcloud auth login
gcloud auth application-default login
gcloud services enable aiplatform.googleapis.com --project=YOUR_PROJECT_ID

Then copy config.json.example to config.json and set vertex.project_id. On AI Studio, keep the key in config.json (or GEMINI_API_KEY) rather than the api_key widget - widget values ride along into exported workflows and error reports. Rotate anything that's ever been screenshotted.

Getting a good one

The pack ships workflows under workflows/ that wire two loaders into a Batch Images node for the character and two more for the look reference, with unused loaders bypassed - Ctrl+B switches one on, and a bypassed loader sends nothing. Copy a loader to add an angle.

If your result just looks like one of your inputs, that's the collapse: trim the reference to the one thing its label authorises, or drop it and write the note instead.

The usual Vertex errors apply - 403 SERVICE_DISABLED means the enable step didn't run, Vertex mode needs credentials means only the first gcloud login ran, and a 404 on a model is usually the region ("location": "us-central1").

CategoryCharacter Swap

Inputs (20)

NameTypeDefaultDescription
backendCOMBOVertex AI (gcloud or service account)2 options: AI Studio (api key), Vertex AI (gcloud or service account)
modelCOMBOgemini-3-pro-image-preview3 options: gemini-3-pro-image-preview, gemini-2.5-flash-image, gemini-2.0-flash-preview-image-generation
seedINT420–2147483647
aspect_ratioCOMBOauto (match reference)11 options: auto (match reference), 1:1, 2:3, 3:2, 3:4, 4:3, +5
resolutionCOMBO2K3 options: 1K, 2K, 4K
characteroptIMAGE
character_2optIMAGE
look_referenceoptIMAGE
lighting_referenceoptIMAGE
composition_referenceoptIMAGE
wardrobeoptIMAGE
shot_descriptionoptSTRING
camera_notesoptSTRING
lighting_notesoptSTRING
blocking_notesoptSTRING
character_notesoptSTRING
wardrobe_notesoptSTRING
do_notoptSTRINGno text, no watermark, no extra people, no duplicated or cloned person, no collage, no grid, no split frame, no border
api_keyoptSTRING
timeoutoptINT30030–1800

Outputs (3)

NameTypeDescription
IMAGEIMAGE
final_promptSTRING
diagnosticsSTRING