Nodes/LNL Frame Selector/LNL Frame Selector [Deprecated] ⛔️
ComfyUI Node

LNL Frame Selector [Deprecated] ⛔️

It Works, But V4 Is the One You Want

By dunklehohle·Created 2 years ago·Updated 5 months ago· 28
LNL Frame Selector [Deprecated] ⛔️
  • images
  • audio
  • Current image
  • Image Batch (in/out)
  • Frame in
  • Frame out
  • Filename
  • Frame count (rel)
  • Frame count (abs)
  • Current frame (rel)
  • Current frame (abs)
  • Frame rate
  • audio
video_path
force_size
custom_width512
custom_height512
pause_on_executefalse
pause_timeout1000
fps0.0
graph_id

The author's own node menu already tells you everything you need to know: this one is literally labeled "LNL Frame Selector [Deprecated] ⛔️". The pack's current node - confusingly displayed as "LNL Frame Selector V3" but classed LNL_FrameSelectorV4 - supersedes it. So if you're here, you either loaded an old workflow or you're doing archaeology. Either way, here's what this node is, why it got retired, and why you should swap it out.

What it is

The LNL Frame Selector turns a ComfyUI node into a video player. You drop a video in, preview and scrub it right in the node, set In and Out points, and the node spits out that exact range of frames as an IMAGE batch. That's the whole game: cutting a clip down to the frames you actually want to feed a video model or a sampler, without leaving the graph to trim it with ffmpeg or a desktop editor first.

For img2vid work - say Wan i2v or LTX, where you're animating a specific handful of frames - frame selection is the boring-but-critical front end. This is that front end, and it's the same idea pythongosssss's Custom-Scripts and Kosinkadink's VideoHelperSuite popularized (the pack credits both).

How it works

Two pieces. The front end (web/VideoPlayer) does the scrubbing, playback, and In/Out marking with a timeline that shows current frame over total frames. The back end (modules/video_utils.py) does the actual lifting on execution: it opens the file with OpenCV's VideoCapture, decodes the frames between In and Out into a tensor (BGR→RGB, with an optional force_size resize), and pulls audio out with ffmpeg. The node reads your scrubber position, In, and Out straight off its own widgets when the graph runs, so what you set in the UI is exactly what you get out.

The inputs and outputs that matter

The video_path dropdown scans your ComfyUI/input folder for mp4, webm, and mkv files and defaults to the first one found. Two alternate routes: connect an images IMAGE batch and the file picker hides (the batch becomes the timeline), or connect an audio input to override the file's soundtrack. force_size gives you presets like 512x512 or 512x? to normalize frames before they hit a model with fixed expectations. pause_on_execute (with pause_timeout) optionally stalls the graph so you can confirm your trim before it runs - handy when a misclick would otherwise waste a long generation.

The output you actually care about is Image Batch (in/out) - the trimmed frame range, ready to feed a sampler or a video pipeline. The rest is metadata: Frame in / Frame out, Frame count (rel) and (abs), Current frame relative and absolute, Frame rate as an INT, Filename, and the single current frame as Current image.

Why it's deprecated

Two warts, both fixed in the V4 node. First, its audio output is VHS_AUDIO - VideoHelperSuite's audio format - which is only convenient if you've also got VHS installed. Second, it only exposes frame rate as a rounded INT. V4 (the node that displays as "LNL Frame Selector V3") outputs native ComfyUI AUDIO plus a FLOAT frame rate. No reason to stay on this one; a swap is a ten-second rewire.

Install and troubleshooting

It ships in the LNL Frame Selector pack, so it's a Manager search away, or:

cd ComfyUI/custom_nodes
git clone https://github.com/latenightlabs/ComfyUI-LNL.git
cd ComfyUI-LNL
pip install -r requirements.txt

Dependencies are light - opencv-python, imageio-ffmpeg, Pillow - no model downloads. Audio mostly "just works" because imageio-ffmpeg bundles an ffmpeg binary; the README's note about needing ffmpeg/ffprobe in your PATH only bites if you want a specific system build.

Two gotchas worth knowing. The README warns that numeric outputs show 0 if the node isn't connected - directly or indirectly - to an output node; ComfyUI skips computing value outputs otherwise. And OpenCV is pinned at ~=4.12.0, so a stray upgrade can break frame decoding. If you hit that, reinstall the pinned version.

CategoryLNL

Inputs (10)

NameTypeDefaultDescription
video_pathSTRING
force_sizeCOMBO12 options: Disabled, Custom Height, Custom Width, Custom, 256x?, ?x256, +6
custom_widthINT5120–8192
custom_heightINT5120–8192
pause_on_executeBOOLEANfalse
pause_timeoutINT10001–9999999
imagesoptIMAGE
audiooptAUDIO
fpsoptFLOAT0.00–240
graph_idoptSTRING

Outputs (11)

NameTypeDescription
Current imageIMAGE
Image Batch (in/out)IMAGE
Frame inINT
Frame outINT
FilenameSTRING
Frame count (rel)INT
Frame count (abs)INT
Current frame (rel)INT
Current frame (abs)INT
Frame rateINT
audioVHS_AUDIO