Image_batch_select
Pull specific frames back out of a batch
- image
- image
You've got a batch of images - a video sequence, a big generation batch, an animated diff run - and you don't want to send all of it forward. Maybe every fourth frame, maybe a spread of ten evenly across the whole thing, maybe just a range starting partway through. Image_batch_select is the trimming node: point it at a batch and it hands back a subset instead of the whole thing.
How it works
mode (a dropdown, default "step") picks the selection strategy. In step mode, index sets where you start and step sets the stride - keep every step-th frame from index onward. uniform and max_output look like they belong to a different mode entirely: most likely an "evenly redistribute" option that spreads picks across the batch rather than striding through it, capped at max_output results. The schema doesn't list the full mode set beyond the "step" default, so treat the dropdown as something to click through in ComfyUI rather than something to fully reverse-engineer from the brief alone.
The inputs and outputs that matter
image(required) - your batch.mode(default"step") - selection strategy.index(default 0, range −8192 to 8192) - start point; the generous negative range suggests indexing from the end is supported.step(default 4) - stride, when in step mode.uniform(default 4) andmax_output(default 10) - bounds for whichever mode uses them;max_outputin particular caps how many frames you get back no matter what step/uniform would otherwise produce.- Output:
image- the selected subset.
How to install it
Via ComfyUI Manager, search ComfyUI-Apt_Preset and install. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git
Windows: install.bat. Linux/Mac: pip install -r ComfyUI-Apt_Preset/requirements.txt in your venv, no bundled script for it. Restart ComfyUI. No models to fetch for a pure batch-indexing node - the pack's heavier dependencies (pandas, gguf, onnxruntime, scenedetect, and the rest) belong to other corners of this actively maintained, ~300-star pack, not this one.
Common issues & troubleshooting
Empty output. index accepts values far past any realistic batch length (up to 8192), so nothing clamps you if you set it beyond your actual batch size - you'll just get nothing back. Check your batch count before assuming the node is broken.
Fewer frames than expected. max_output truncates whatever step or uniform would otherwise produce. If you set a small step expecting a lot of frames and get far fewer, raise max_output first before touching anything else.
"step" isn't giving you what you want. That's what the other dropdown options exist for - don't fight index/step arithmetic trying to simulate a spread-evenly selection; switch modes and let the node do it.
Missing from the node menu entirely. Every node in Apt_Preset ships from one Python module - a single broken dependency in requirements.txt can knock the whole pack out of the menu, not just this node. Check the ComfyUI console for import errors first.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| mode | COMBO | step | 3 options: index, step, uniform |
| index | INT | 0-8192–8192 | — |
| step | INT | 41–8192 | — |
| uniform | INT | 40–8192 | — |
| max_output | INT | 100–8192 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |