ImageBatchGet
Pull a single frame out of a batch
- images
- IMAGE
ImageBatchGet extracts one image out of an IMAGE batch and returns it as a batch of one. Feed it a stack of frames, tell it which one you want, and you get that single frame back - still in IMAGE form, ready to feed any node that expects an image. It's the simplest member of Allor's ImageBatch family, and it's the answer to a very common "I just need frame seven" moment.
The inputs: images (IMAGE) and index, which is 1-based - 1 is the first image in the batch, not the zeroth. That trips up people coming from Python/NumPy thinking, and it's the one thing to internalize. Two other behaviors worth knowing:
- Index is clamped, not erroring. Ask for
index99 on a 5-image batch and you get the last image, not a crash. That's convenient for sweeping through a batch with a widget, but it means an out-of-range value is silently forgiven - if you're indexing dynamically, sanity-check the batch size first. - Output is still an IMAGE tensor, just with a batch of 1. So it plugs straight into anything that consumes images - a preview, a filter, a save node - with no type gymnastics. If you need the raw frame for something that wants a different shape, you'd handle that downstream.
Why is a single-frame extractor useful in practice? Batch workflows are everywhere in ComfyUI - grid outputs, animation strips, multi-prompt runs - and sometimes you only want one result: the best of N, a specific frame of an animation, or just the first pass from a batch to inspect. It's also a clean way to grab a "reference" frame to route into a ControlNet or a second sampler while the rest of the batch goes elsewhere. Combine it with ImageBatchCopy and you can turn one frame into a whole batch; with ImageBatchFork, split the stack into halves.
Installing it
It ships with the Allor plugin:
cd ComfyUI/custom_nodes
git clone https://github.com/Nourepide/ComfyUI-Allor
cd ComfyUI-Allor
pip install -r requirements.txt
Restart ComfyUI, or search "Allor" in ComfyUI Manager. Pack-level notes: requirements.txt pulls in rembg and onnx for the segmentation nodes even though this node is pure tensor indexing, and Allor's repo was rebased to strip images from git history - a change that can make auto-updates fail, with troubleshooting pages in the docs at nourepide.github.io/ComfyUI-Allor-Doc.
Real talk
This is a tiny node with exactly one footgun - the 1-based index - and after that it just works. It's the kind of utility you forget exists until you're staring at a 20-image batch and wishing you could isolate one frame without a workaround. For that moment, it's perfect. Just remember: 1 means first, and asking for something past the end won't complain, it'll just hand you the last frame.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| index | INT | 1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |