Readme
BiRefNet — video background removal
The full BiRefNet variant zoo + ToonOut, applied frame-by-frame to a video. Sister model to the stills endpoint sprited/birefnet. MIT-licensed — free for commercial use.
Highlights
- Transparent output by default — VP9
.webmwith full alpha (MP4 can’t carry transparency). Also ProRes 4444.mov,.mp4(composited), or.gif. - Anime / illustration —
variant=toonouthandles hair wisps, line art, and translucency that general removers smear. - The whole zoo, one input — general / HR / portrait / matting / dynamic / lite / 2K, swapped per request via
variant. - Controls — cutout or raw mask; refine foreground; grow/shrink/blur the matte; quality and write-mode encoding presets.
Per-frame note: BiRefNet has no temporal model, so fast motion can shimmer slightly between frames — the tradeoff for variant choice + ToonOut quality. For still images and animated GIF/WebP, use sprited/birefnet.
Inputs
- video — mp4 / mov / webm / m4v
- variant — default
general - output_format —
cutoutormask - video_output_type —
webm(default, alpha) /mov(alpha) /mp4/gif - background_color, resolution, refine_fg, mask_blur, mask_offset
- video_quality (low/medium/high/maximum), video_write_mode (fast/balanced/small), precision (fp32 default / fp16)
Credits
Unofficial community packaging — not affiliated with the model authors; we earn nothing (compute fees go to Replicate).
- BiRefNet — Peng Zheng et al. · MIT · https://github.com/ZhengPeng7/BiRefNet
- ToonOut — Matteo Muratori & Joël Seytre · MIT · https://arxiv.org/abs/2509.06839