OmniShotCut Loader
The boring node every OmniShotCut workflow has to start with
- model
OmniShotCutLoader is the least glamorous node in the pack and also the one that stops everyone on day one. Its entire job: look in the pack's checkpoints/ folder for a .pth file, and hand whatever it finds to the Detector. One dropdown in, one OMNI_MODEL out. If you don't set this up right, nothing else in the pack does anything.
Why a separate loader at all? Same reason every ComfyUI model pack does this - the model is a ~heavy research checkpoint, and loading it lazily keeps ComfyUI's startup snappy. The node only touches the model when you actually run it. It scans checkpoints/, then on execution lazy-imports the OmniShotCut inference wrapper, loads the state dict with weights_only=False (the fix for PyTorch 2.6's security tightening), and puts the model on whatever device ComfyUI's own model manager recommends - with a graceful CPU fallback if VRAM is short. The model is small enough (ResNet18 backbone plus a transformer) that the CPU fallback isn't a joke; it'll be slow, but it'll run.
Inputs and outputs
- model_name - a dropdown listing every
.pthin the pack'scheckpoints/folder. That's the whole input list. If the folder is empty you'll see a Chinese placeholder message that translates to "no .pth file found, please put the model into the checkpoints directory." That message is not a bug - it's the pack telling you it's still hungry. - model (
OMNI_MODEL) - the output. Wire it into themodelinput ofOmniShotCutDetector. That's the only place it goes.
Install and the checkpoint that bites
Install is the pack's standard three-step:
# ffmpeg first (the detector decodes video through it)
# then, in ComfyUI/custom_nodes:
git clone https://github.com/GG-A9/ComfyUI_OmniShotCut
cd ComfyUI_OmniShotCut
pip install -r requirements.txt
Then the checkpoint, which is where the README gets you. It suggests git clone https://huggingface.co/uva-cv-lab/OmniShotCut/resolve/main/OmniShotCut_ckpt.pth - but that URL points at a file, not a repo, so a bare git clone is not the right tool. What actually matters is the end state: a file named OmniShotCut_ckpt.pth sitting at custom_nodes/ComfyUI_OmniShotCut/checkpoints/OmniShotCut_ckpt.pth. Any of these gets you there:
cd custom_nodes/ComfyUI_OmniShotCut
mkdir -p checkpoints
wget https://huggingface.co/uva-cv-lab/OmniShotCut/resolve/main/OmniShotCut_ckpt.pth -O checkpoints/OmniShotCut_ckpt.pth
# or: curl -L <same-url> -o checkpoints/OmniShotCut_ckpt.pth
# or just clone the repo and copy the file over
Common issues
- Dropped the
.pthin and the dropdown still shows the "no file" message. The dropdown is scanned when the node definitions are built, i.e. at ComfyUI startup or node-list refresh. Put the model in place before launching ComfyUI, then restart - or reload the node definitions in the frontend. It won't appear live mid-session. - A
FileNotFoundErrorwhen you run. The loader builds the checkpoint path relative to the pack's own folder, so a model placed anywhere else (like your regularmodels/dir) simply won't be found. It has to live inComfyUI_OmniShotCut/checkpoints/. - Out-of-memory at load time. The node falls back to CPU automatically and prints a warning to the console, so you're not bricked - just patient.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| model_name | COMBO | 1 options: [未找到 .pth 文件,请将模型放入 checkpoints 目录] |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| model | OMNI_MODEL | — |