Nodes/TrentNodes/Cut Detective
ComfyUI Node

Cut Detective

Find every shot boundary and hand the timeline to H3

By TrentHunter82·Created 9 months ago·Updated 4 days ago· 36
Cut Detective
  • video
  • frames
  • cut_times
  • shot_table
  • film_strip
  • report
  • cuts_json
  • num_shots
  • detector_used
detectorauto
sensitivity0.50
min_shot_frames4
thumb_width240
columns0
show_timelinetrue
include_first_shottrue
fps24.00
title
thumbs_per_shot1
omnishotcut_overlap20
fallback_policycascade

Cut Detective is the shot-boundary detector in TrentNodes, and it's the most technically ambitious node in the pack. Feed it a clip and it finds every cut, tells you what kind of cut each one is (hard cut, dissolve, wipe, fade, even a whip-pan), renders a labelled film-strip contact sheet, and hands the cut list off to the pack's H3 Auto Prompt Generator so the prompt's [Shot N] times land on real cuts instead of guesses.

If you're making MiniMax H3 videos from source footage, this is the node that stops your prompt from describing shots that don't match the clip's actual edit. That's not a small deal - H3's format is built around a shot list, and a wrong cut list means a prompt full of confidently wrong timestamps.

How it works: three detectors, one cascade

The detector widget defaults to auto, which tries detectors in order and uses the first that loads:

  • omnishotcut - a 2026 shot-query video Transformer from the UVA Computer Vision Lab. Best accuracy, and the only one of the three that labels transitions (dissolve, wipe, fade, whip-pan) instead of just flagging a boundary. Needs CUDA and downloads a ~164 MB checkpoint on first use. It's not on PyPI and isn't installed automatically - see below.
  • transnetv2 - the proven baseline; ships its weights in the wheel, runs on CPU, reports hard cuts only. Reliable, boring, free.
  • classic - the frame-difference detector the pack's Chop Cuts uses. No model, no download. The README is blunt that it's "a safety net, not a peer."

Because the cascade can fall, there's a fallback_policy (cascade = try all three, neural_only = never the classic detector, strict = OmniShotCut or an error) and a detector_used output so you know what actually ran. A silent fallback to the weak detector would hand H3 a worse cut list with nothing to show for it - the node makes that visible instead.

The inputs that matter

  • sensitivity - drives TransNetV2 and the classic detector. Higher finds more cuts. OmniShotCut ignores it (it predicts shot ranges directly); its real knob is omnishotcut_overlap, the overlap between 100-frame inference windows. Raise it if a boundary near a window edge looks wrong.
  • min_shot_frames - shots shorter than this fold into the previous one; kills detector wobble around a single cut.
  • include_first_shot - keep 0.000 at the head of cut_times. On = "every shot start" (what H3 wants); off = "boundaries only."
  • Video can come in as a video input (preferred, carries fps) or as frames + fps.

Outputs

cut_times (comma-separated seconds - wire it into H3's cut_times), shot_table (one readable line per shot), film_strip (the contact sheet, with a colour-coded marker on each shot's first frame and a proportional timeline ribbon), plus report, cuts_json, num_shots, and detector_used. Any of the three string outputs feeds H3 - the parser also reads timecodes, [Shot N] At MM:SS.mmm labels, and hand-typed multi-line lists.

Installing the OmniShotCut part (important)

OmniShotCut is not on PyPI and not auto-installed. Install it with --no-deps, which genuinely matters - its requirements pin transformers==4.57.3 and its pyproject lists torch, so a plain install can downgrade a working ComfyUI environment:

pip install --no-deps git+https://github.com/UVA-Computer-Vision-Lab/OmniShotCut.git

Without it, Cut Detective just falls back to TransNetV2. Skip the extra install if you're fine with hard cuts only; add it when you want transition typing.

Install the node

# ComfyUI Manager: search "Trent Nodes"

# or:
cd ComfyUI/custom_nodes
git clone https://github.com/TrentHunter82/TrentNodes.git
cd TrentNodes && pip install -r requirements.txt

transnetv2-pytorch is in the pack requirements and downloads its own weights. The README's numbers (OmniShotCut range F1 0.883 vs ~0.814 for the other two) are the reason this node is worth trying before you assume shot detection is a solved problem - it's newer than the usual suspects and better on transitions.

CategoryTrent/Video

Inputs (14)

NameTypeDefaultDescription
detectorCOMBOautoauto: OmniShotCut, then TransNetV2, then the classic frame-difference detector - first one that loads wins. omnishotcut (2026 SOTA, needs CUDA + the omnishotcut package) is the only one that labels dissolves, wipes and fades. transnetv2 runs on CPU with bundled weights but reports hard cuts only. classic needs nothing and is a safety net, not a peer.
sensitivityFLOAT0.500–1Higher finds more cuts. Applies to transnetv2 and classic; omnishotcut predicts shot ranges directly and ignores it.
min_shot_framesINT41–240Shots shorter than this fold into the previous one. Kills detector wobble around a single cut.
thumb_widthINT24064–640Width of each film-strip thumbnail, in pixels
columnsINT00–32Thumbnails per row. 0 fits as many as it can.
show_timelineBOOLEANtrueDraw the proportional timeline ribbon under the strip, with a tick at every cut
include_first_shotBOOLEANtrueKeep 0.000 at the head of cut_times. On means 'every shot start' (what the H3 node wants); off means 'boundaries only'.
videooptVIDEOSource clip. Preferred input; carries its fps.
framesoptIMAGEAlternative to video: an IMAGE batch (e.g. from VHS Load Video). Set fps to match.
fpsoptFLOAT24.001–240Frame rate of the frames input. Ignored when a video is connected.
titleoptSTRINGFilm-strip header. Blank uses a default.
thumbs_per_shotoptINT11–8Thumbnails sampled from each shot. 1 shows only the frame after the cut. Raise it to see what happens inside a long shot. Shots are never dropped to fit; the count degrades instead, and the sheet says so.
omnishotcut_overlapoptINT200–90Frames of overlap between OmniShotCut's 100-frame inference windows. This is the knob that actually changes its results, since it predicts shot ranges directly and ignores sensitivity. Raise it if boundaries near a window edge look wrong; it costs proportional time. No effect on the other detectors.
fallback_policyoptCOMBOcascadeHow far 'auto' may fall when a detector is unavailable. cascade tries all three. neural_only refuses the classic detector, which misses gradual boundaries and invents short shots. strict demands omnishotcut and errors instead of substituting. Ignored when you name a detector.

Outputs (7)

NameTypeDescription
cut_timesSTRING
shot_tableSTRING
film_stripIMAGE
reportSTRING
cuts_jsonSTRING
num_shotsINT
detector_usedSTRING