You're looking at a specific version of this model. Jump to the model overview.
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
|
|
| variant |
None
|
general
|
Which BiRefNet model to use. 'general' is the "
"all-purpose model; '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.
|
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'}