Select Image from Batch
Grab One Frame Out of a Batch — It's Smarter Than You'd Expect
- images
- IMAGE
"Select Image from Batch" is the simplest node in the Pixel-Forge pack, and also one of the most useful, because every batch workflow eventually needs to pull out a single frame. It takes an IMAGE batch plus an index, and hands you back one image.
The inputs
images(IMAGE) - any batched imagesbatch_index(INT, default 0) - which image you want
That's the whole surface. Feed it a batch of 24 crops, set batch_index to 7, and out comes image #7.
Two behaviors worth knowing, both visible in the source:
It clamps instead of crashing. If you ask for an index past the end of the batch, it quietly gives you the last image. Ask for a negative index, you get the first. Some people hate that (silent clamping hides bugs), but for a node you're often driving from a UI slider or a math node that can overshoot, it means no sudden workflow failures. Just remember it when your "wrong" image turns out to be index clamped to the last frame.
It keeps the output as a length-1 batch. The output is images[index:index+1], not a squeezed 2D image. That's deliberate and it matters: most ComfyUI image nodes expect a batched tensor with a leading dimension, so a bare single image would break them or behave oddly. Keeping the batch dimension means the output plugs into anything an IMAGE socket accepts, including the Pixel-Forge similarity nodes.
Why you'll actually reach for it
It's the natural companion to this pack's CropDisjointRegions workflow. Once you've cropped out a pile of regions, you often want to hand one specific crop to something as a reference - that's exactly the image_ref input of Image Similarity (Sequential CLIP). Select the crop you care about, feed it to the ref socket, done. Same story for pulling a single frame out of a video batch before comparing or processing it.
Install
Pixel-Forge standard: ComfyUI Manager → search "ComfyUI-Pixel-Forge" → install → restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/ThunderBolt4931/comfyui_pixel_forge
then restart. This node has no model downloads and no heavy dependencies - it's a slice-and-clamp utility, found under Pixel_Forge/Batch.
One honest caveat about the pack: it's brand new (December 2025 commit, no meaningful community footprint yet), the README is scaffolding that documents none of the nodes, and there's some cosmetic inconsistency in the category names. For a node this simple, none of that matters - but if you're building a production workflow on this pack, verify behavior yourself rather than trusting docs that don't exist.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| batch_index | INT | 0 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |