π’ Gemini Select Image From List
Pick one native-size image out of a list
- images
- selected_image
- selected_index
- count
Gemini Select Image From List picks one image out of an image list by index and keeps its native dimensions. It looks like a twin of Gemini Image Select, and the difference is the whole point: Image Select works on a batch (one tensor, all images same size), this works on a list (each image its own size), and it's the one you want whenever your images have mixed dimensions.
Local, no API, no key. It's part of the pack's list/batch trio (with List Passthrough and List β Batch Padded), and all three exist because ComfyUI's batch type is one shared-HΓW tensor, which makes mixed-size images a genuine engine constraint rather than a node quirk. If you have a list of crops at different resolutions and you want to grab one and keep its exact size, this is the node.
How it works
With INPUT_IS_LIST, ComfyUI hands the node the entire list at once, not one image at a time. The node flattens what it receives (splitting any stray batches into individual images, dropping Nones), then indexes in: index 0 is the first image. Out-of-range handling matches the pack's other selectors - out_of_range of clamp returns the last image, wrap cycles (index 5 in a list of 3 β image 2).
Outputs: selected_image (as a single-image IMAGE, at its native resolution - nothing resized, nothing padded), selected_index (the resolved index after clamping/wrapping), and count (how many images the list actually held). The count output is quietly useful: wire it into whatever drives index and you can clamp or randomize over the true list length instead of hardcoding a number that drifts as the list changes.
Which one do I use - batch or list?
This is the pack's one genuinely confusing pair, and the README settles it in a sentence: if your images share dimensions, a batch selector (Gemini Image Select) is fine; if they don't, use the list one. Practically: mixed-size crops out of a mask-based crop node, assorted reference photos, varied product shots - list. Uniform frames from a grid or a single-size loader - batch. Feed a list of mixed sizes into a batch selector and you'll be fighting the engine over a shape error; feed them into this node and it just works.
And don't forget the third sibling: if you need the whole list as a batch downstream, List β Batch Padded gets you there by padding instead of resizing; if you need the list to stay a list, List Passthrough formalizes that.
Install
Same pack, same story: ComfyUI Manager search "ComfyUI_Gemini", or git clone https://github.com/aarnoatchi/ComfyUI_Gemini into custom_nodes and pip install -r requirements.txt. No scipy, no key, nothing extra. Under AI/Image Analysis/Google after restart.
The failure mode to watch for is subtle: because downstream nodes auto-iterate over lists in ComfyUI, wiring a list into a node that expects a batch can silently process one item at a time instead of erroring - so if a downstream node is running N times when you expected once, that's the list/batch boundary telling you something. This node hands you a clean single image precisely so you can cross that boundary intentionally.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | An image LIST (mixed dimensions allowed). Index 0 is the first. | |
| index | INT | 00β4095 | Which image to pick from the list (image 0, image 1, ...). |
| out_of_rangeopt | COMBO | clamp | When index is past the end of the list: clamp β return the last available image wrap β wrap around (index 5 in a list of 3 β image 2) |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| selected_image | IMAGE | β |
| selected_index | INT | β |
| count | INT | β |