comfyui-frame-deleter
A custom ComfyUI node that lets you interactively review and remove individual frames from a video batch before it continues through your workflow.
FrameDeleter — ComfyUI Node
A custom ComfyUI node that lets you interactively review and remove individual frames from a video batch before it continues through your workflow — no external tools required.
What it does
When a video batch reaches the FrameDeleter node, execution pauses and a full interactive UI appears directly on the node. You scrub through every frame, mark any you want removed, and then resume. The node outputs the cleaned image batch with your selected frames deleted, and the rest of the workflow continues normally.
Features
- Frame scrubber — drag a slider to seek through the batch instantly; dropped frame positions are marked with red ticks on the track so you can see the distribution of your cuts at a glance
- Prev / Next buttons — step through frames one at a time
- Drop / Restore toggle — mark the current frame for deletion or undo it
- Preview mode — toggle between editing and a live preview of the final cut result; the scrubber and Prev / Next remap to only the surviving frames so you can play through the output as it will appear
- Dropped-frames bubble list — a scrollable panel shows all marked frames; click any bubble to jump straight to that frame
- Live preview — the current frame is rendered inside the node, with a red ❌ overlay when it is marked for deletion
- Non-destructive — nothing is modified until you click Confirm Cuts & Resume; cancelling the queue discards all selections and returns the original batch untouched
Installation
-
Clone or copy this repository into your ComfyUI
custom_nodesdirectory:cd ComfyUI/custom_nodes git clone https://github.com/aw-leigh/frame-deleter -
Restart ComfyUI. The node will register automatically — no extra dependencies are required beyond a standard ComfyUI install.
Usage
- Add the FrameDeleter node to your graph (found under Video Processing).
- Connect an
IMAGEbatch — typically the output of a video loader node — to its input. - Connect the node's
IMAGEoutput to the rest of your pipeline. - Run the queue. When execution reaches FrameDeleter, it will pause and the UI will become active.
- Scrub or step through the frames and press ❌ Drop Frame on any you want removed. Press it again on a marked frame to restore it.
- Optionally press 👁 Preview Cut Result to enter preview mode. The scrubber and Prev / Next will remap to only the kept frames, letting you play through the result as it will look after the cut. Press ✏️ Back to Editing to return to normal navigation.
- When you are happy with your selections, press 🚀 Confirm Cuts & Resume. The node outputs the batch with the marked frames removed and execution continues.
Tip: If you mark every frame by mistake, the node will raise an error rather than silently passing the full batch through. Just re-run and keep at least one frame.
Node reference
| Property | Value |
|---|---|
| Category | Video Processing |
| Input | IMAGE batch |
| Output | IMAGE batch (frames removed) |
| Cache | Always re-executes (IS_CHANGED returns NaN) |
How it works
When execution reaches the node, the Python backend saves each frame as a temporary JPEG and sends their filenames to the frontend over ComfyUI's WebSocket. The node thread then waits on a threading.Event. The JavaScript extension receives the filenames, loads previews via the /view endpoint, and renders the interactive UI. When you confirm your selections, the frontend POSTs the list of frame indices to /frame_deleter/confirm, the backend wakes up, filters the tensor batch, and temporary files are cleaned up on a background thread. Stale temp files from any previous crashed session are also removed automatically on startup.
Preview mode is implemented entirely in the frontend — the scrubber and navigation controls remap their 0→1 range onto an array of only the non-dropped frame indices, so no additional data is sent to or from the backend.
License
MIT