You're looking at a specific version of this model. Jump to the model overview.

sprited /birefnet:21f2c4a9

Input schema

The fields you can use to run this model with an API. If you don’t give a value for a field its default value will be used.

Field Type Default value Description
image
string
Input image. Animated GIF/WebP are supported (returned as an animated WebP with transparency). For movie files (mp4/mov/webm), try sprited/birefnet-video.
variant
None
general
Which BiRefNet model to use. 'general' is the all-purpose default; 'toonout' is the anime/stylized fine-tune; the rest are specialized BiRefNet zoo models.
resolution
integer
0

Max: 2048

Inference resolution (square). 0 = use the variant's native resolution (1024, or 2048 for HR/2K variants).
output_format
None
cutout
'cutout' = RGBA image with background removed; 'mask' = the raw single-channel alpha matte.
mask_blur
integer
0

Max: 64

Gaussian blur radius applied to the matte (softer edges)
mask_offset
integer
0

Min: -64

Max: 64

Grow (+) or shrink (-) the matte by this many pixels
refine_fg
boolean
False
Refine foreground colours (FB blur fusion) to remove background bleed on soft edges. Ignored for 'mask' output.
precision
None
fp32
GPU inference precision. 'fp32' (default) is full precision. 'fp16' is somewhat faster and uses less VRAM (modest on A100 — ~87ms vs ~69ms; bigger gains on older GPUs), with negligible quality difference.

Output schema

The shape of the response you’ll get when you run this model with an API.

Schema
{'format': 'uri', 'title': 'Output', 'type': 'string'}