Nodes/ccsun_node/several images
ComfyUI Node

several images

Pick which images from a batch actually move on

By CC-SUN6·Created 2 years ago·Updated about a year ago· 0
several images
  • images
  • selected_images
selected_image

Generate a batch of four, six, ten images off different seeds and you've got a new problem: only some of them are worth keeping. Most workflows either save all of them (and you clean up in a file browser afterward) or force you to run one seed at a time and eyeball each. "several images" is the middle path - it's an image selector built for batches. Feed it a batch, look at the previews it renders, and type which one(s) you actually want to keep going. Only those get passed further down the graph.

How it works

It's one of the pack's two "output" nodes (the other, Single Image, is the single-pick version - see below). Because it's flagged as an output node, it always runs when you queue a prompt and renders previews in the UI, the same way a Preview Image node does, whether or not you've wired anything downstream of it. That's the visual review step: you see the batch laid out, and decide.

The selection itself happens through selected_image, and it's worth noticing this is a plain text field, not a number spinner - unlike its sibling Single Image node, which uses a simple integer widget. That's the tell that this node is built to take more than one index at a time, matching the plural naming (images in, selected_images out). The exact syntax for listing multiple indices isn't spelled out in the pack's README, so if you're picking more than one, just try the obvious - comma-separated numbers is the safe first guess for a plain text index field like this.

Inputs and outputs

  • images (required) - wire in a batch, typically straight off a KSampler run with batch_size > 1, or after a VAE Decode on a multi-image latent.
  • selected_image (required, text, default empty) - type the index or indices of the image(s) you want to keep from the batch.
  • selected_images (output) - just the images you picked, ready to hand to a Save Image, an upscaler, or whatever comes next in your pipeline.

This is a good example of the kind of thing that's easy in ComfyUI's graph model and awkward almost everywhere else: a manual review gate sitting mid-pipeline, where you look at a batch and decide what survives before compute gets spent on the next stage.

Installing it

Search ccsun_node in ComfyUI Manager, or clone it by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/CC-SUN6/ccsun_node

Restart ComfyUI. No extra dependencies or model downloads - this one's pure Python logic over image tensors.

Things worth knowing

Because it's an output-type node, it'll execute and show you previews even if you leave selected_images completely unconnected - that's expected behavior, not a bug, and the same thing you'd see from a stock Preview Image node.

One honest gap: the node's own metadata carries a generic description ("Saves the input images to your ComfyUI output directory") that reads like boilerplate left over from a template rather than an accurate description of what this specific node does - its actual job, based on its inputs and outputs, is selecting a subset, not writing files. If you want a copy saved to disk, chain an explicit Save Image node after it rather than assuming this one does it for you.

The other thing to just try rather than guess at: what happens if you leave selected_image blank. The pack doesn't document a default behavior for an empty selector, so if nothing seems to come through on the output, that's the first thing to check - type in the index you want and see if it starts flowing.

Categoryccsun_node

Inputs (2)

NameTypeDefaultDescription
imagesIMAGE
selected_imageSTRING

Outputs (1)

NameTypeDescription
selected_imagesIMAGE