Select Images π₯π ₯π π ’
Pick specific frames by index, range, or step
- image
- IMAGE
This is the Swiss-army knife for grabbing exactly the frames you want out of an image batch. Hand it a batch and a little index string, and it returns the frames you named - a single one, a scattered handful, a range, every other frame, or the whole thing reversed. If you know Python slicing, you already know how to drive it, because it borrows Python's exact syntax. It's the frame-picking utility in Kosinkadink's VideoHelperSuite, and it's genuinely one of the handier nodes in the pack once you get the notation.
Where it shines: pulling the last frame of a video to continue a sequence, extracting a specific still to inspect, dropping a bad frame, reordering, or reversing a clip. All the fiddly "I just need frame 47" and "give me frames 10 through 20 backwards" tasks that are annoying to do any other way.
How it works
You provide a comma-separated list of indexes in the indexes widget, and it returns those items in the order you asked. It's zero-based, negative indexes count from the end, and colon ranges work Python-style (end excluded), with an optional step. Straight from the node's own examples, assuming 16 frames (indexes 0β15):
0returns frame 0;-1returns the last frame.0, 1, 13returns those three.0:5, 13returns 0,1,2,3,4 and 13.0:-1returns everything except the last.0:5:-1returns 4,3,2,1,0 (reversed range).0:5:2returns 0,2,4 (every other).::-1reverses the whole batch.
The inputs that matter
image- the batch to pick from.indexes- the selection string (default"0"). This is the whole game; everything above is valid here.err_if_missing(default true) - throw an error if you ask for an index that doesn't exist, instead of silently skipping it.err_if_empty(default true) - error if the selection ends up empty.
The single output is IMAGE, the selected frames in your requested order.
How to install it
ComfyUI Manager: search ComfyUI-VideoHelperSuite, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite
then restart. No weights.
Common issues & troubleshooting
"Index out of range" errors. You asked for a frame that isn't there - say index 20 in a 16-frame batch. Either fix the index or set err_if_missing to false to have it skip missing ones quietly (handy when batch length varies run to run).
I got an empty result and the graph stopped. err_if_empty is true by default, so an empty selection halts execution deliberately. Set it false if an empty output is acceptable in your flow.
My reverse/step isn't working. Double-check the colon syntax - it's start:stop:step, stop is exclusive, and a negative step reverses. ::-1 (empty start and stop) is the clean "reverse everything."
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | β | |
| indexes | STRING | 0 | β |
| err_if_missing | BOOLEAN | true | β |
| err_if_empty | BOOLEAN | true | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | β |