Nodes/TrentNodes/Cherry Pick Frames
ComfyUI Node

Cherry Pick Frames

Grab the exact frames you want, not a slice

By TrentHunter82·Created 9 months ago·Updated 4 days ago· 36
Cherry Pick Frames
  • images
  • frame_1
  • frame_2
  • frame_3
  • frame_4
  • frame_5
  • frame_6
  • frame_7
  • frame_8
  • frame_9
  • frame_10
  • frame_11
  • frame_12
  • frame_13
  • frame_14
  • frame_15
  • frame_16
modefirst_n
num_frames1
frame_indices0
step1

Every video pipeline eventually needs "just these frames" - the keyframes for a storyboard, the endpoints for a first/last-frame model, an even sample to preview a 400-frame render without watching all of it. ComfyUI's native batch slicing is clunky about this, which is exactly the gap Cherry Pick Frames fills: one node, four selection modes, and the outputs appear on the node face as you use them. It's plumbing, and it's the good kind.

The modes

  • first_n - the first N frames. Default mode.
  • last_n - the last N frames. Endpoints are a first/last-frame generation's bread and butter.
  • specific - explicit comma-separated indices like 0,5,10,75. The mode for keyframes you've already identified.
  • every_nth - a stride. Combined with num_frames you get "every 3rd frame, take the first 8 of those," which is the even-preview pattern.

Inputs are images plus mode, with num_frames (max 16), frame_indices, and step as the mode-specific params. The outputs are the quietly clever part: instead of a fixed set, the node exposes frame_1 through frame_16 and only activates the ones you actually select, so a two-frame grab shows two sockets and a 16-frame grab shows sixteen. It's the dynamic-input pattern that makes ComfyUI graphs stay readable instead of sprouting a wall of empty sockets.

Where it earns its keep

The three workflows this node exists for:

  1. First/last-frame video - grab frame 0 and the final frame, wire them into a Wan or LTX first+last frame sampler. That's the single most common AI-video pattern, and it's two seconds of node work here.
  2. Keyframe extraction - run a detection pass (or just know your shots), type the indices, and feed exactly those frames to a reference-aware model or a keyframe builder.
  3. Preview contact sheets - every Nth frame through a grid node gives you a skim-able overview of a long render without decoding 400 frames.

There's a pleasant honesty in the mode naming here - the node isn't trying to be a shot-detection tool (the same pack's Cut Detective does that properly). It's a selector: you tell it what you want and it fetches it.

Gotchas

  • specific mode wants indices within range. The node doesn't silently clamp out-of-range indices in all cases, so double-check your list against the batch length if you're scripting it from a report.
  • every_nth with num_frames - remember num_frames caps the output count, step sets the stride. If you want "all frames every 3rd," set num_frames high; the cap of 16 outputs is the practical limit.
  • The dynamic outputs can confuse saved workflows if the mode changes between saves. If a graph loads with sockets you didn't expect, it's usually the mode.

It ships in TrentNodes - ComfyUI Manager (search "Trent Nodes"), or clone + pip install -r requirements.txt. No models, no downloads, just indexing. It's the kind of node you won't think about until you've re-built the same slice-with-a-custom-node three times, at which point you'll be glad it's there.

CategoryTrent/Image

Inputs (5)

NameTypeDefaultDescription
imagesIMAGEBatch of images to pick frames from
modeCOMBOfirst_nSelection mode: first_n, last_n, specific indices, or every_nth
num_framesoptINT11–16Number of frames to extract (for first_n, last_n, every_nth modes)
frame_indicesoptSTRING0Comma-separated frame indices, e.g., '0,5,10,75' (for specific mode)
stepoptINT11–100Step size - grab every Nth frame (for every_nth mode)

Outputs (16)

NameTypeDescription
frame_1IMAGE
frame_2IMAGE
frame_3IMAGE
frame_4IMAGE
frame_5IMAGE
frame_6IMAGE
frame_7IMAGE
frame_8IMAGE
frame_9IMAGE
frame_10IMAGE
frame_11IMAGE
frame_12IMAGE
frame_13IMAGE
frame_14IMAGE
frame_15IMAGE
frame_16IMAGE