OmniShotCut β€” Inference Endpoint

A thin custom Inference Endpoint wrapper around OmniShotCut. Returns shot ranges plus typed transition labels for a video.

The model weights are pulled from uva-cv-lab/OmniShotCut at cold start, so this repo hosts only handler.py + requirements.txt.

Deploy (you do this β€” it needs your account + a paid GPU)

# 1. create an empty MODEL repo on your account (not a Space)
huggingface-cli login                      # your token; keep it out of any file
huggingface-cli repo create omnishotcut-endpoint --type model

# 2. push these two files
git clone https://huggingface.co/<you>/omnishotcut-endpoint && cd omnishotcut-endpoint
cp /path/to/handler.py /path/to/requirements.txt .
git add handler.py requirements.txt && git commit -m "OmniShotCut endpoint handler" && git push

Then on the repo page: Deploy β–Έ Inference Endpoints β–Έ pick a GPU instance (a small T4/L4 is plenty), leave the container as Default, and Create Endpoint. Set Automatic scale-to-zero so it stops billing when idle.

Call it

import requests

API = "https://<your-endpoint>.endpoints.huggingface.cloud"
HDR = {"Authorization": f"Bearer {HF_TOKEN}", "Content-Type": "application/json"}

# video by URL (endpoint fetches it) β€” or send a base64 mp4 in "inputs"
body = {"inputs": "https://example.com/clip.mp4", "parameters": {"mode": "default"}}
print(requests.post(API, headers=HDR, json=body, timeout=300).json())
# -> {"shots": [[0,124],[125,300],...],
#     "intra_labels": ["General","Dissolve","Wipe",...],
#     "inter_labels": ["New-Start","Hard Cut","Transition",...]}

mode="clean_shot" returns just {"shots": [...]}.

Notes

  • GPU required. A dedicated endpoint bills by uptime; scale-to-zero keeps idle cost near nil but adds a cold-start (~30–60s) on the first request after sleep.
  • Timeouts. Long videos take real time; give the client a generous timeout and, if you wire this into RAVA, use the same wall-clock watchdog pattern added for the Gemini calls so a hung request can't freeze a worker.
  • Weights caching. First cold start downloads the checkpoint; subsequent starts reuse the image cache.
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support