Gemini Image Batch Processor
Ask Gemini to compare, sequence, or diff a whole stack of images
- images
- analysis_text
- first_image
- api_request
- api_response
The node for "look at all these images at once"
GeminiImageProcessor analyzes one image. This node takes a whole IMAGE batch - a tensor with several frames, or a stack of images from a batch generator - and runs a single Gemini call over all of them together. That's the whole trick, and it unlocks questions you can't ask of a single image: which of these four renders matches the prompt best? What changes between these frames? What's different between these two versions?
It's a quiet node in this pack, but there's no substitute for it. Batch comparison is genuinely not something a single-image node can do.
How it works
You feed it an images IMAGE input (a batch - anything with more than one frame works), pick a mode, and it sends the whole set to Gemini in one multimodal request:
- batch_describe (default) - describe all the images together.
- compare - have the model compare them, which is where "which looks most like X?" style questions live.
- sequence_analysis - for frames in order, like analyzing a shot sequence or a mini-animation.
- find_differences - spot what changed between images. The obvious use is A/B comparisons of generations.
The process_individually toggle changes the mechanism: off (default) sends everything as one request; on processes each image separately. One request is cheaper and gives the model the full context; individual processing gives per-image detail. The model defaults to gemini-1.5-flash, a good stable choice for vision.
Inputs and outputs
- images - your batch (required).
- mode - pick the job.
- prompt - the specific instruction; defaults to "Analyze these images."
- process_individually - batch-as-one vs. per-image.
- temperature, max_output_tokens - the standard dials; low temperature for comparison/analysis tasks.
Outputs are analysis_text (the verdict - wire it to a text display node), first_image (an IMAGE passthrough of the first frame, handy for keeping a visual in the graph), and the pack's standard api_request / api_response debug strings. When the model's answer seems off, those two outputs are where you'll see what actually got sent.
Install
It's part of the one-pack install, same as everything else here:
cd ComfyUI/custom_nodes
git clone https://github.com/jqy-yo/comfyui-gemini-nodes
cd comfyui-gemini-nodes
pip install -r requirements.txt
Or "ComfyUI Gemini Nodes" via ComfyUI Manager, restart, and drop your key in api_key or the GOOGLE_API_KEY env var.
Where people get burned
Two common mistakes. First, feeding it a single image and wondering why "compare" makes no sense - comparison needs a batch of at least two frames; build one with a Load Image β Image Batch or from a generator before this node. Second, expecting per-image detail from the default batch mode: with process_individually off, Gemini gives you one synthesized answer, not a per-frame breakdown - flip the toggle when you need the latter (and expect more calls/cost). And remember the model limits: the pack's own notes warn that lite models choke on large batches, so keep gemini-1.5-flash or better here.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| api_key | STRING | β | |
| images | IMAGE | β | |
| mode | COMBO | batch_describe | 4 options: compare, sequence_analysis, batch_describe, find_differences |
| prompt | STRING | Analyze these images. | β |
| model | STRING | gemini-1.5-flash | β |
| temperature | FLOAT | 0.70β1 | β |
| max_output_tokens | INT | 204850β8192 | β |
| process_individually | BOOLEAN | false | β |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| analysis_text | STRING | β |
| first_image | IMAGE | β |
| api_request | STRING | β |
| api_response | STRING | β |