FL Video Trim
Chop frames off the head and tail of a clip
- images
- trimmed_video
- start_frames
- end_frames
AI video has a bad-frames problem at the edges. The first frame of a Wan or LTX clip is often a near-still that hasn't started moving yet, and the last frame can drift or glitch as the model runs out of runway. FL_VideoTrim is the blunt fix: tell it how many frames to lop off the start and the end, and it hands you back the clean middle. It's the kind of node you don't think you need until every clip you make has a slightly-off first frame you keep cropping by hand.
Under the hood it's dead simple - a frame batch is just an ordered stack of images, and this slices frames off each end. But it does one thoughtful thing: it doesn't throw the removed frames away, it gives them back to you on separate outputs. So you can trim and still grab, say, that last good frame to use as the start image for the next clip in a chain.
The inputs and outputs
Inputs:
images(IMAGE) - your frame batch.trim_start(0–1000) - how many frames to remove from the front.trim_end(0–1000) - how many to remove from the back.
Outputs - and this is the nice part:
trimmed_video(IMAGE) - the middle, what's left after the cuts. This is your cleaned clip.start_frames(IMAGE) - the frames you cut off the front.end_frames(IMAGE) - the frames you cut off the back.
Those last two aren't throwaway. In a last-frame-to-first-frame chaining workflow - the standard trick for building long video by feeding each clip's final frame into the next clip's I2V - you want a specific frame, and end_frames hands you exactly the tail you trimmed so you can pluck the good one.
Installing it
Ships in ComfyUI_Fill-Nodes. ComfyUI Manager: search Fill-Nodes, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/filliptm/ComfyUI_Fill-Nodes
then restart ComfyUI. No downloads - it's pure tensor slicing.
Where it fits
Two common uses. One: cleanup. Trim the mushy first frame and any tail glitch before you interpolate (FL_RIFE in this same pack) or export, because interpolating across a bad frame just smears it. Two: chaining prep. When you're extending a video, generate, trim the transition frames, and reuse the removed tail as the seed for the next segment. The only thing to watch is arithmetic - if trim_start + trim_end is close to your total frame count you'll be left with almost nothing, and trimming more than you have gives you an empty clip. Count your frames, trim modestly (often just 1–2 off the front is enough), and check the result before you build the rest of the chain on top of it.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| trim_start | INT | 00–1000 | — |
| trim_end | INT | 00–1000 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| trimmed_video | IMAGE | — |
| start_frames | IMAGE | — |
| end_frames | IMAGE | — |