Select Images Advanced
Frame Selection With Presets, for When You Can't Be Bothered With Syntax
- image
- selected_images
- selected_indexes
Select Images Advanced is the slightly smug older sibling of Select Images: same idea, same index-string parser underneath, but it adds a selection_mode dropdown so you don't have to type ranges for the five most common jobs. "First N frames," "last N frames," "every Nth frame," "N random frames" - all one click. It's the node you reach for when you keep writing 0-10:2 and thinking "there has to be a button for this."
The modes
custom- same string grammar as Select Images (5,1,3,5,3-10,0-10:2, negatives). Identical behavior.first_n- the firstn_countframes.last_n- the lastn_countframes.every_nth- everystepframes, starting at 0.random-n_countframes picked at random, seeded by theseedinput so you can reproduce a given pick.
Under the hood each mode just builds an index string and feeds it to the same parser as the plain node - same dedupe-and-sort behavior, same err_if_missing / err_if_empty safety toggles.
The output that makes it worth having
Two outputs, and the second one is the sleeper feature: selected_images is the batch you asked for, but selected_indexes returns the actual index string that got used. When you pick random, that's genuinely useful - you can see exactly which frames got chosen and, say, echo that string into another node that needs to match. It's also a great debugging tool: watch what first_n really did before you trust it downstream.
The honest take
Let's be real: this is a thin utility, and in a pack this obscure you're not going to find anyone recommending it. But it sits right in the gap where ComfyUI's stock batch nodes end and your patience for index math begins. If you're doing "take every 4th frame from a 48-frame generation and upscale just those," every_nth beats typing ranges, and the seed on random selection is a genuinely nice touch for pulling a repeatable "lucky frames" sample.
One thing to keep in mind: random sorts its picks, so it's random selection, not random shuffling - the output stays in original frame order. And first_n/last_n clamp silently to the batch size if you ask for more than exists.
Installing it
Same pack, same steps as every SwiftCut node - ComfyUI Manager, search "ComfyUI_SwiftCut," or:
cd ComfyUI/custom_nodes
git clone https://github.com/yichengup/ComfyUI_SwiftCut
Restart ComfyUI, look under YC_VideoCutHelper → Image Tools. Only torch/Pillow/numpy to worry about, no models, no heavy dependencies. If you already run plain Select Images, this is a zero-cost upgrade for the modes.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| selection_mode | COMBO | custom | 5 options: custom, first_n, last_n, every_nth, random |
| indexes | STRING | 0 | — |
| n_count | INT | 51–1000 | — |
| step | INT | 21–100 | — |
| seed | INT | 00–2147483647 | — |
| err_if_missing | BOOLEAN | true | — |
| err_if_empty | BOOLEAN | true | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| selected_images | IMAGE | — |
| selected_indexes | STRING | — |