Remove Frames MXD
Chop the mushy ends off a clip without opening an editor
- frames
- image
Video models are generous with garbage frames. The first two frames of a Wan 2.2 I2V run are motion blur; the last frame of an LTX draft often dissolves. And then there's arithmetic: your next stage wants a frame count that satisfies the model's 4n+1 grid, and you've got 81 frames when you need 77. This node deletes a contiguous window of frames from the start or the end of an IMAGE batch and hands the rest onward. In-graph, instant, no ffmpeg invocation.
How it works
It's pure tensor surgery. Your frames arrive as a batch shaped (N, H, W, C), the node computes a start and end index from your settings, and rebuilds the batch as head + tail. The window is clamped rather than trusted: offset gets squeezed into 1..total, and count gets squeezed into total - offset + 1. If the removal would leave you with zero frames it raises Removing this window would leave no frames instead of quietly handing an empty batch downstream - which is the right call, since a silent empty batch is much harder to debug than a red node.
The four widgets
- frames - the IMAGE batch. Decoded video, or a generation's output before it gets encoded.
- count - how many frames to remove. Default 10.
- offset - "how far into the video to start removal (from start or end)". It's 1-based, and which end depends on mode.
- mode -
start(the default) orend.
Read offset as "skip this many frames from the chosen end, then delete count of them". mode: start, offset: 1, count: 2 removes the first two frames. mode: end, offset: 1, count: 3 removes the last three. mode: end, offset: 5, count: 3 cuts three frames sitting five from the end - less common, but that's the handle for trimming a specific transition.
Output is a single image batch: the same frames, hole removed. It does not retime anything and doesn't interpolate a replacement, so deleting frames makes the clip shorter in duration at the same fps. If you're removing an overlap between two segments you're about to concatenate, that's exactly what you want. If you were hoping to slim a clip without changing its length, you want frame interpolation instead.
Where it sits in a graph
After whatever produced frames, before whatever consumes them. In practice: VAE Decode → Remove Frames MXD → Create and Save Video, or → the next generation stage when you're stitching clips and need the frame maths to line up. It also pairs with the same pack's Select Frames MXD, which uses identical window maths but keeps the window it calculates instead of dropping it - handy when you want to grab the last frame as an end-image for the next segment.
One caveat on the count: the max of 10000 is an upper bound, not a hint. Set count to what you actually need removed - if the clip is shorter than you thought, the clamp quietly gives you a smaller cut than you asked for.
Install
ComfyUI Manager: search Maxed Out, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/Maxed-Out-99/ComfyUI-MaxedOut.git
Then restart ComfyUI. The pack has no pip dependencies, and unlike its video I/O nodes this one is registered unconditionally - it doesn't need the newer comfy_api import, so it shows up even on older builds.
Worth knowing what this pack is: it's the daily-driver toolkit of Maxed-Out99, the workflow-guide guy who posts free beginner SDXL and Flux graphs and walks people through nodes rather than selling shaders. The README's own framing is "make existing nodes easier to use in the day-to-day", with rgthree and KJNodes as the stated inspirations. So expect opinionated small plumbing - trimming, comparing, presets - not a new sampler.
Things that catch people
It edited the wrong end. mode defaults to start, and offset counts from whichever end you selected, not from the beginning of the clip always. If your trim landed somewhere bizarre, that's the pair of widgets to re-read.
Memory. Slicing a batch clones it, and frames are float32. Trim a 300-frame 1080p batch and you're briefly holding both versions. On long clips, trim early rather than at the very end of the pipeline.
It won't fix a bad clip. Removing two frames doesn't repair a melted hand. This is a scalpel for frame counts and soggy heads and tails, nothing more.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| frames | IMAGE | — | |
| count | INT | 101–10000 | Number of frames to remove |
| offset | INT | 11–10000 | How far into the video to start removal (from start or end) |
| mode | COMBO | start | Remove frames from the start or end of the sequence |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |