Image Segmentation
BiRefNet
Safetensors
background-removal
mask-generation
Dichotomous Image Segmentation
pytorch_model_hub_mixin
model_hub_mixin
custom_code
Instructions to use ZhengPeng7/BiRefNet-legacy with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- BiRefNet
How to use ZhengPeng7/BiRefNet-legacy with BiRefNet:
# Option 1: use with transformers from transformers import AutoModelForImageSegmentation birefnet = AutoModelForImageSegmentation.from_pretrained("ZhengPeng7/BiRefNet-legacy", trust_remote_code=True)# Option 2: use with BiRefNet # Install from https://github.com/ZhengPeng7/BiRefNet from models.birefnet import BiRefNet model = BiRefNet.from_pretrained("ZhengPeng7/BiRefNet-legacy") - Notebooks
- Google Colab
- Kaggle
Commit ·
a2fe5a2
1
Parent(s): 6dd9966
Add inference endpoint feature in HF model page.
Browse files- handler.py +1 -1
handler.py
CHANGED
|
@@ -75,7 +75,7 @@ usage_to_weights_file = {
|
|
| 75 |
}
|
| 76 |
|
| 77 |
# Choose the version of BiRefNet here.
|
| 78 |
-
usage = 'General'
|
| 79 |
|
| 80 |
# Set resolution
|
| 81 |
if usage in ['General-Lite-2K']:
|
|
|
|
| 75 |
}
|
| 76 |
|
| 77 |
# Choose the version of BiRefNet here.
|
| 78 |
+
usage = 'General-legacy'
|
| 79 |
|
| 80 |
# Set resolution
|
| 81 |
if usage in ['General-Lite-2K']:
|