Image Select From Batch
Grab one frame out of a batch by index — and know what happens when you overshoot
- image_batch
- image
ImageSelectFromBatch is the most unassuming node in this pack and the one you'll reach for constantly. You feed it a batch of images and an integer, and it hands back the single frame at that index. That's the entire job, and it does it without ceremony.
The inputs are image_batch (IMAGE) and index (INT, default 0, min 0, max 63). The output is image - one frame, still as an IMAGE tensor with a batch dimension of 1, which is exactly what you want for feeding into any slot that expects IMAGE.
Why it exists
The pack's whole reason for being is Qwen-Image-Edit's multi-reference workflows. ComfyUI's built-in TextEncodeQwenImageEditPlus node takes a prompt plus up to three reference images (the image1/image2 slots you see in every Qwen edit workflow), and the editor's whole trick is that it can borrow from one image while keeping another stable - "put the hat from image2 on the person in image1." So you end up with batches of reference panels: a character turnaround you generated, a stack of outfit shots, a few frames pulled out of a video batch.
When you want exactly one of those panels routed into an image1 or image2 slot, this is the minimal way to do it. There are fancier batch-slicing nodes out there, some of them in core ComfyUI. This one's claim to fame is that it has one input you care about (the index), one output, and nothing else to misconfigure. If you need two frames at once, this pack's QwenMultiRefEncoder is the two-index version; if you need a contiguous range, reach for a range-select node. This one is for "exactly one, right now."
The gotcha is the clamping
Here's the part nobody tells you: when index is larger than the batch actually is, the node doesn't error. It silently clamps to the last frame. The source does min(index, count - 1) and returns that frame. So index 6 on a 4-frame batch gives you frame 3 (0-indexed) - the last one - and nothing in the UI hints you missed.
That's a feature if you think of it as "give me a safe default," a footgun if you expect a number you typed to be honored. In practice: if you're pulling a specific reference panel out of a 6-image batch, double-check the count first (the pack's ImageBatchBuilder outputs a batch_size INT for exactly this), or eyeball the preview. A wrong index will not announce itself.
Second, the widget hard-caps at 63. That covers a 64-frame batch and no more. If something hands you a bigger batch - say, a long video frame sequence - you literally cannot reach the tail through the widget without bypassing. Fine for the reference-panel use case the pack targets, worth knowing before you point it at a 200-frame video.
Install
It's one of four nodes in balarooty/Multi-image-loader, so you get it with the whole pack. ComfyUI Manager: search "Multi-image-loader" in Install Custom Nodes. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/balarooty/Multi-image-loader
Restart ComfyUI afterward. No pip dependencies and no model downloads - the pack uses only torch, numpy and PIL, all standard in ComfyUI. The Qwen checkpoint you're feeding references into loads through ComfyUI's normal model loaders.
Fair warning that applies to the whole pack: it's new and essentially untested in the wild (single commit, no real community footprint), so treat it as a simple utility to eyeball rather than battle-tested. Given that this particular node is about ten lines, eyeballing is cheap. Custom nodes run unsandboxed Python, so the usual "look before you install" rule still holds.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image_batch | IMAGE | — | |
| index | INT | 00–63 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |