Select Frame π
Grab one frame out of a batch without guessing the index
- frames
- image
Sometimes you don't want the video - you want one frame of it, and you want to be sure it's the right one. Select Frame π pulls a single frame out of any IMAGE batch by a one-based frame number and returns it as a one-image batch, with two small conveniences that save you from the usual failure modes.
The one-based numbering is the first one. ComfyUI's own batch indexing is famously zero-based in places, and nothing in a graph tells you which convention the node you're using expects. This node is explicit: 1 is the first frame. No off-by-one guessing.
The second is the out-of-range behavior. Ask for frame 57 of a 40-frame clip and instead of silently selecting something wrong - the failure mode of a naive index - the node reports the valid range. That's the difference between "weird frame appeared in my output" and "clear error message." The panel also shows the frame you picked, so you can check without a separate preview node.
What it takes in
frames (any BHWC image batch - video frames or otherwise) and frame_number (default 1, minimum 1). One output: image, the selected frame as a one-image batch. No optional parameters, no widgets to tune. It's the smallest node in the pack, and it's meant to be.
The practical uses are exactly where you'd expect: grab a single frame to feed a vision model (the LM Studio Chat node, for instance, only sends the first frame of a batch - so you pull the frame you want first, then caption it), pull a poster frame to inspect, or extract one frame for an img2img pass while keeping the rest of the clip for video work.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/ausboss/ComfyUI-AusBoss.git
Restart ComfyUI and search for AusBoss (Manager: ComfyUI-AusBoss). No extra dependencies; minimum ComfyUI 0.27.1.
Troubleshooting
The one thing to internalize is the indexing convention - one-based, always. If you're coming from a node that fed you a zero-based index, subtract... no, add one. And remember the output is a one-image batch, not a bare image: it's shaped to drop straight back into anything that expects an IMAGE, which is most things. If a downstream node acts like it got a video, it didn't - you got one frame in a batch of one.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| frames | IMAGE | Video frames or any other BHWC IMAGE batch. | |
| frame_number | INT | 1-2147483647β2147483647 | One-based frame number: 1 selects the first frame. Negative counts from the end: -1 is the last frame, -2 the one before it. 0 is invalid. |
| previewopt | BOOLEAN | true | Show the selected frame on the node. Off skips writing the preview file to ComfyUI's temp folder. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | The selected frame as a one-image BHWC batch. |