Image Selector
It Picks the Brightest Frame, Not the One You Pointed At
- images
- IMAGE
Here's a README that's wrong, and the source code is right, so trust the code. The pack's README describes Image Selector as "choose one image from a batch by index." It doesn't. There is no index input anywhere on this node. What it actually does is look at the batch of images you give it, compute the mean brightness of each, and hand you back the single brightest one.
That's a useful behavior - it's just not the behavior the marketing describes, and knowing the difference saves you a confused afternoon.
How it works
The implementation is about as direct as it gets:
brightness = list(torch.mean(image.flatten()).item() for image in images)
brightest = brightness.index(max(brightness))
result = images[brightest].unsqueeze(0)
For every image in the input batch, it flattens the tensor and takes the mean - a crude luminance score. The highest-scoring image wins, and it comes out as a fresh single-image batch (the unsqueeze(0)), so downstream nodes that expect a batch still work.
What it's for
Honest uses: you've got a batch of generated candidates, or frames from a video/animation pass, and you want to auto-pick a representative one. "Brightest" as a proxy for "best exposed" or "least likely to be a dark dud" is crude but not crazy - for a batch of otherwise similar renders, the brightest is often the cleanest. It's the kind of heuristic you'd use in a rough auto-curation pass: pick one image from N without a human in the loop.
What it is not for: choosing image #3 because that's the one you liked. There's no index input - you can't select by position with this node. If you want that, you need a different tool (a proper batch-index selector from a bigger pack, or a slice). The README's promise and the node's reality disagree, and the node's reality is what you get.
Inputs and outputs
- images (
IMAGE) - your batch. The only input. - IMAGE - the chosen single image, as a batch of one.
Because the output is a standard IMAGE, you can feed it straight into a VAE decode, an upscaler, or a compare node. It's a small, self-contained utility; there's no configuration to fiddle with.
Install
It's one of eleven nodes in geocine-comfyui, which installs with no model downloads and no heavy dependencies:
- ComfyUI Manager → search geocine-comfyui → install → restart
- or Comfy CLI:
comfy node install geocine-comfyui - or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/geocine/geocine-comfyui
then restart ComfyUI.
Common issues
"It picked the wrong one." Define "wrong." If you meant "the image at index 2," you're using the wrong tool - this node has no notion of position, only brightness. If the batch is genuinely varied in content, mean brightness is a blunt instrument and the winner can look arbitrary. In that case pick your frame upstream with a real selector, or just accept the node's one opinion. And note it's deterministic: same batch in, same "brightest" out, every time.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |