Nodes/comfyui-character-swap/Read the Shot (photo -> breakdown)
ComfyUI Node

Read the Shot (photo -> breakdown)

Turn Any Reference Photo Into a Cinematography Breakdown

By haristahir1·Created a day ago·Updated a day ago· 0
Read the Shot (photo -> breakdown)
  • shot_reference
  • shot_breakdown
backendVertex AI (gcloud or service account)
modelgemini-2.5-flash
extra_question
api_key
timeout180

The smallest node in this pack, and the one I'd actually leave enabled. Point it at a photo you want to steal the look of, and it writes back a breakdown - framing, camera, lens, lighting, colour, pose, wardrobe, set, texture - in about nine labelled lines. No sampling, no GPU, no image output: just a vision model reading a photograph.

It runs on a Gemini text model, not an image model, which is the whole point: this costs a fraction of a generation. If your intent is "make me more like this photo," finding out what's actually in it is cheaper than burning generations guessing.

How it works

The node sends your photo plus a fixed instruction naming the exact headings to answer under, one short line each, no preamble. The headings are the structure, and the structure is the useful part.

Two details in that instruction are lifted from how cinematographers actually talk, and they matter downstream. Directions are stated relative to the frame - frame left, frame right - never the subject's own left, the ambiguity that ruins half of hand-written pose notes. And pose is read as body orientation plus axis, head angle, eyeline and hand positions, roughly the vocabulary the pack's Character Swap node wants in its blocking_notes.

backend and model are required. The default text model is gemini-2.5-flash, listed cheapest-first: flash-lite if you're batching, 2.5-pro if you want the careful one. extra_question appends one free-text question as "Also answer: …" - the escape hatch for "how far off-axis is the key light". api_key works on AI Studio; timeout defaults to 180s.

The single output is shot_breakdown, a STRING. Wire it into a text-preview node to read it, or into a note. There's no IMAGE output at all, which trips people up once.

One mechanism worth knowing: only the first frame of a batch is read - feed it batch size 4 and you get one breakdown, of image one.

On Vertex, if the model 404s at "global" the node quietly retries regionally in us-central1, rather than making you work out where each text model is served. The image nodes don't do that retry - if a text model works and an image one 404s, set location in config.json.

Using it without fighting it

The breakdown is a reading, not a prompt. Don't dump the whole thing into Character Swap's shot_notes and expect a faithful swap - the pack's system prompt says written instructions outrank anything implied by the pictures, so pasting nine lines of description over a reference image means you're overriding the reference you just loaded. By design, not a bug - and the usual way people get a swap that looks nothing like their photo.

Use it as a notebook. Run it once, read the output, and paste only the lines you actually want to override. It's genuinely useful for that: naming a 35mm-equivalent lens and a key direction in words is easier than trying to describe mood, and the KB's prompting doc is blunt that LLM-assisted prompting went from exotic to routine through 2026 for exactly this reason.

It's also the honest way to answer "why does that photo look like that?", and cheap enough to build a small library of look notes you can reach for later.

Install and setup

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 adds google-auth, declared in pyproject.toml.

Vertex, if you want Google's Cloud trial credit to pay for it - AI Studio's Gemini API is excluded from that trial:

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

Then config.json with vertex.project_id set. On AI Studio, put the key in config.json or GEMINI_API_KEY, not in the node's api_key widget - widget values get saved into every workflow you export.

Where it goes wrong

Vertex mode needs credentials means you ran the first gcloud login and not the second - the application-default one is what Python reads. 403 SERVICE_DISABLED means the enable step didn't run. 429 prepayment credits depleted is an empty AI Studio balance. And if it errors with "got no answer", the model returned no candidates at all: usually the photo, not your prompt.

One thing nobody should be surprised by: you're sending a photograph to Google. If the frame is anything a hosted filter objects to, it will say so, and there's nothing to patch locally - that refusal is the cost of reading the shot at this price.

CategoryCharacter Swap

Inputs (6)

NameTypeDefaultDescription
shot_referenceIMAGE
backendCOMBOVertex AI (gcloud or service account)2 options: AI Studio (api key), Vertex AI (gcloud or service account)
modelCOMBOgemini-2.5-flash5 options: gemini-2.5-flash, gemini-3.5-flash, gemini-3.8-flash, gemini-2.5-flash-lite, gemini-2.5-pro
extra_questionoptSTRING
api_keyoptSTRING
timeoutoptINT18015–900

Outputs (1)

NameTypeDescription
shot_breakdownSTRING