Nodes/ComfyUI Assistant Node/PVL Gemini Api Multi
ComfyUI Node

PVL Gemini Api Multi

Gemini, six images at a time — the multimodal variant

By pvlprk·Created about a year ago·Updated 8 months ago· 1
PVL Gemini Api Multi
  • image1
  • image2
  • image3
  • image4
  • image5
  • image6
  • text
modelgemini-2.5-flash
tries2
timeout45
temperature1.00
top_p0.95
top_k65
batch1
delimiter[++]
append_variation_tagfalse
debugfalse
instructions
prompt
seed0
api_key

The base Gemini node in this pack takes one optional image. This one takes six - image1 through image6 - because sometimes "describe this" is a multi-image job. Think reference sheets: you dump six poses of a character into the inputs, ask for a written character sheet or a tagging breakdown, and Gemini 2.5's multimodal model does the rest. It's the same parallel-batch engine, but aimed at workflows where the picture set is the payload.

Where people actually reach for this: turning a pile of reference images into prompt text, captioning a grid of renders for a dataset, or extracting a consistent visual description across a batch of frames. The node does the image-to-text leg that would otherwise take you six separate single-image nodes and a merge.

How it works

All six images (whichever are connected) get converted and sent inline with your instructions and prompt to Google's generativelanguage.googleapis.com v1beta endpoint. The batch machinery applies on top: with batch > 1 the same prompt-with-images runs in parallel and results are joined by delimiter (default [++]). Retry logic is the pack's standard - retryable failures retried with linear backoff, only failed items re-run, hard errors fail fast.

The inputs that matter

  • image1image6 - the payload. Only connect the ones you need; the rest stay dormant.
  • prompt and instructions - your question and the framing. With six images connected, prompt like "compare these six images and list differences" works far better than a generic "describe."
  • model - default gemini-2.5-flash; the dropdown includes pro, flash-lite, and 2.0-flash. Vision cost scales with model choice, so flash-lite is worth trying for captioning.
  • batch and delimiter - parallel-run and result joining, same as the base node.
  • tries, timeout, temperature, top_p, top_k, seed - the standard engine knobs.
  • api_key - optional; leave blank to use GEMINI_API_KEY from the environment.

Output: one text string, the combined result of however many parallel calls batch spawned.

Installing it

The usual pack install:

cd ComfyUI/custom_nodes
git clone https://github.com/pvlprk/comfyui-pvl-api-nodes

Restart, set GEMINI_API_KEY or fill the api_key field. No model downloads - Gemini lives on Google's servers.

Common issues

The batch/delimiter interaction is the same trap as the base node: with append_variation_tag off and batch at 1, you get one call. With batch > 1 you're making duplicate calls (same prompt, same images) unless variation tagging is on - which is fine for consistency, wasteful if you expected diversity. Second, image inputs accept batches (a whole grid of frames on one port), but the node only uses the first frame per port for the request - if your "six images" are really one batch of six frames, you're only sending one. Split them with the pack's PVL Image Batch to Image List if you genuinely need all six seen. And as ever: every call bills Google, six images × batch 4 is 24 vision calls per execution, so check the pricing page once before you build a loop around it.

CategoryPVL/LLM

Inputs (20)

NameTypeDefaultDescription
modelCOMBOgemini-2.5-flash4 options: gemini-2.5-pro, gemini-2.5-flash, gemini-2.5-flash-lite, gemini-2.0-flash
triesINT21–10
timeoutINT451–600
temperatureFLOAT1.000–2
top_pFLOAT0.950–1
top_kINT651–1000
batchINT11–64
delimiterSTRING[++]
append_variation_tagBOOLEANfalse
debugBOOLEANfalse
instructionsSTRING
promptSTRING
seedINT0
image1optIMAGE
image2optIMAGE
image3optIMAGE
image4optIMAGE
image5optIMAGE
image6optIMAGE
api_keyoptSTRING

Outputs (1)

NameTypeDescription
textSTRING