ComfyUI-Image-Selector
A custom node for ComfyUI, which can select one or some of images from a batch.
Background
ComfyUI dosn't handle batch generation seeds like A1111 WebUI do (See Issue #165), so you can't simply increase the generation seed to get the desire image from a batch generation.
So here is a simple node that can select some of the images from a batch and pipe through for further use, such as scaling up or "hires fix".
Or you can use PreviewImage Node to go through all the images, and then rewire SaveImage with ImageSelector to save the one you want.
Install
Clone this repo into custom_nodes directory of ComfyUI location
Usage
ImageSelector & ImageDuplicator
Both nodes can be found in image category.
Selector takes a list of selected indexes, start with 1 (not 0, sorry), seperated by comma, and outputs only the selected images from input images.
For example:
1: select the first image1,3,4,6,7: select the 1st, 3rd, 4th, 6th and 7th image
All indexes that cannot convert to integer or out of bounds will be ignored.
Duplicator takes a number and duplicates input images by given times.
LatentSelector & LatentDuplicator
Both nodes can be found in latent category.
The parameters and functionality is just like the image counterpart, but for latents
Tips
VAE Decode & Encode takes time and vram, so better avoid uneccessary VAE node. If must, do it with as few images/latents as possible. In general,
encode/decode -> duplicatoris better thanduplicator -> encode/decodeselector -> encode/decodeis better thanencode/decode -> selector