sprited/birefnet

Complete BiRefNet background removal — all 10 official variants plus the ToonOut anime model, with cutout or mask output. MIT-licensed for commercial use.

Public
30 runs

Run time and cost

This model runs on Nvidia L40S GPU hardware. We don't yet have enough runs of this model to provide performance information.

Readme

BiRefNet — complete background removal on Replicate

The full BiRefNet model zoo behind one endpoint: all 10 official variants plus ToonOut for anime/stylized art. Returns a transparent cutout or a raw matte. MIT-licensed — free for commercial use.

Highlights

  • 11 models, one input — switch with variant; one warm container serves them all.
  • Anime / illustrationvariant=toonout handles hair wisps, line art, and translucency that general removers smear.
  • Animated GIF & WebP — multi-frame inputs are matted frame-by-frame and returned as an animated WebP with full transparency (frame timing + loop preserved).
  • Real controlscutout (RGBA) or raw mask; grow / shrink / blur the matte; refine foreground colours; pick inference resolution.
  • MIT / commercial-OK — unlike BRIA-based removers, the output is free to use commercially.

Variants

variant Best for Native res
general general-purpose (default) 1024
general-hr high-resolution photos 2048
portrait human portraits 1024
matting trimap-free soft matting 1024
matting-hr high-res soft matting 2048
dynamic robust across resolutions 1024
dynamic-matting dynamic-res soft matting 1024
lite Swin-Tiny — faster / cheaper 1024
lite-2k Swin-Tiny at 2K 2048
lite-matting Swin-Tiny soft matting 1024
toonout anime / stylized art 1024

Inputs

  • image — any image; animated GIF/WebP supported (→ animated WebP output).
  • variant — which model (table above). Default general.
  • resolution — square inference size; 0 = the variant’s native resolution.
  • output_formatcutout (RGBA) or mask (raw alpha matte).
  • mask_blur / mask_offset — soften / grow / shrink the matte.
  • refine_fg — FB blur-fusion to strip background bleed on soft edges.

Credits

Unofficial community packaging — not affiliated with the model authors; we earn nothing (compute fees go to Replicate).

Source: https://github.com/sprited-ai/birefnet · Anime-only endpoint: https://replicate.com/sprited/birefnet-toonout

Model created
Model updated