Nodes/ComfyUI-VideoHelperSuite/Select Every Nth Image πŸŽ₯πŸ…₯πŸ…—πŸ…’
ComfyUI Node Runs on cloud

Select Every Nth Image πŸŽ₯πŸ…₯πŸ…—πŸ…’

Thin a frame batch down by a fixed interval

By KosinkadinkΒ·Created 3 years agoΒ·Updated 3 months agoΒ· 1,727
Select Every Nth Image πŸŽ₯πŸ…₯πŸ…—πŸ…’
  • images
  • IMAGE
  • count
β—„select_every_nth1β–Ί
β—„skip_first_images0β–Ί

You've got a dense batch of frames and you want fewer of them - evenly spaced, not cherry-picked. Select Every Nth Image keeps one frame out of every N and throws the rest away. Set N to 2 and you halve the batch; set it to 4 and you keep a quarter. It's the simple, predictable frame-thinning node in Kosinkadink's VideoHelperSuite, and it's exactly what you want when a downstream step (a heavy upscaler, an interpolator, a preview) shouldn't see the full frame count.

Compared to its cousin Select Images, this one isn't about naming specific frames - it's about uniform downsampling. Halve your frame rate before an expensive pass, then interpolate back up. Sample a long clip down to a manageable strip of stills. Split one batch into interleaved groups. That kind of thing.

How it works

It walks the batch and keeps the first frame of each interval of select_every_nth, discarding the ones in between. A skip_first_images offset is applied first, before the interval kicks in - which is the clever bit, because two copies of this node with different skip offsets carve the same batch into non-overlapping groups (skip 0 gets frames 0,2,4…; skip 1 gets 1,3,5…).

The inputs and outputs that matter

  • images - the batch to thin.
  • select_every_nth (default 1) - the interval. 1 keeps everything (no-op), 2 keeps every other, and so on.
  • skip_first_images (default 0) - drop this many from the front before the interval logic runs. Use it to offset which frames survive.

Outputs are IMAGE (the thinned batch) and count (how many frames were in the input - useful for downstream math).

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 model downloads.

Common issues & troubleshooting

Nothing changed. select_every_nth is 1 by default, which keeps every frame. Set it to 2 or higher to actually thin.

My output frame rate is now wrong. Dropping frames changes the effective fps. If you thin by 2, the material now plays at half the rate for the same duration - set your Video Combine frame_rate accordingly (or better, do your rate change at the loader with select_every_nth there, which the Video Info node accounts for).

count doesn't match my output length. By design - count reports the input size, not the output. If you need the output length, it's the input count divided by your interval (roughly), or just wire the thinned batch into something that reports its own length.

CategoryVideo Helper Suite πŸŽ₯πŸ…₯πŸ…—πŸ…’/image

Inputs (3)

NameTypeDefaultDescription
imagesIMAGEβ€”
select_every_nthINT11–9007199254740991β€”
skip_first_imagesINT00–9007199254740991β€”

Outputs (2)

NameTypeDescription
IMAGEIMAGEβ€”
countINTβ€”