Instructions to use facebook/sapiens2-matting-1b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sapiens2
How to use facebook/sapiens2-matting-1b with sapiens2:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- sapiens
How to use facebook/sapiens2-matting-1b with sapiens:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Transformers
How to use facebook/sapiens2-matting-1b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-segmentation", model="facebook/sapiens2-matting-1b")# Load model directly from transformers import AutoImageProcessor, Sapiens2ForImageMatting processor = AutoImageProcessor.from_pretrained("facebook/sapiens2-matting-1b") model = Sapiens2ForImageMatting.from_pretrained("facebook/sapiens2-matting-1b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update config.json and preprocessor_config.json
Browse files- config.json +25 -25
config.json
CHANGED
|
@@ -86,7 +86,7 @@
|
|
| 86 |
"num_channels": 3,
|
| 87 |
"num_first_full_attention_layers": 8,
|
| 88 |
"num_hidden_layers": 40,
|
| 89 |
-
"num_key_value_attention_heads":
|
| 90 |
"num_key_value_heads_per_layer": [
|
| 91 |
24,
|
| 92 |
24,
|
|
@@ -96,30 +96,30 @@
|
|
| 96 |
24,
|
| 97 |
24,
|
| 98 |
24,
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
24,
|
| 124 |
24,
|
| 125 |
24,
|
|
|
|
| 86 |
"num_channels": 3,
|
| 87 |
"num_first_full_attention_layers": 8,
|
| 88 |
"num_hidden_layers": 40,
|
| 89 |
+
"num_key_value_attention_heads": 12,
|
| 90 |
"num_key_value_heads_per_layer": [
|
| 91 |
24,
|
| 92 |
24,
|
|
|
|
| 96 |
24,
|
| 97 |
24,
|
| 98 |
24,
|
| 99 |
+
12,
|
| 100 |
+
12,
|
| 101 |
+
12,
|
| 102 |
+
12,
|
| 103 |
+
12,
|
| 104 |
+
12,
|
| 105 |
+
12,
|
| 106 |
+
12,
|
| 107 |
+
12,
|
| 108 |
+
12,
|
| 109 |
+
12,
|
| 110 |
+
12,
|
| 111 |
+
12,
|
| 112 |
+
12,
|
| 113 |
+
12,
|
| 114 |
+
12,
|
| 115 |
+
12,
|
| 116 |
+
12,
|
| 117 |
+
12,
|
| 118 |
+
12,
|
| 119 |
+
12,
|
| 120 |
+
12,
|
| 121 |
+
12,
|
| 122 |
+
12,
|
| 123 |
24,
|
| 124 |
24,
|
| 125 |
24,
|