Instructions to use diffusers/Florence2-image-Annotator with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use diffusers/Florence2-image-Annotator with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("diffusers/Florence2-image-Annotator", torch_dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Upload MellonPipelineConfig
Browse files- mellon_pipeline_config.json +10 -3
mellon_pipeline_config.json
CHANGED
|
@@ -12,7 +12,11 @@
|
|
| 12 |
},
|
| 13 |
"annotation_task": {
|
| 14 |
"label": "Annotation Task",
|
| 15 |
-
"type": "string"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
},
|
| 17 |
"annotation_prompt": {
|
| 18 |
"label": "Annotation Prompt",
|
|
@@ -22,8 +26,11 @@
|
|
| 22 |
},
|
| 23 |
"annotation_output_type": {
|
| 24 |
"label": "Annotation Output Type",
|
| 25 |
-
"type": "
|
| 26 |
-
"
|
|
|
|
|
|
|
|
|
|
| 27 |
},
|
| 28 |
"annotation_overlay": {
|
| 29 |
"label": "Annotation Overlay",
|
|
|
|
| 12 |
},
|
| 13 |
"annotation_task": {
|
| 14 |
"label": "Annotation Task",
|
| 15 |
+
"type": "string",
|
| 16 |
+
"options": [
|
| 17 |
+
"<REFERRING_EXPRESSION_SEGMENTATION>"
|
| 18 |
+
],
|
| 19 |
+
"value": "<REFERRING_EXPRESSION_SEGMENTATION>"
|
| 20 |
},
|
| 21 |
"annotation_prompt": {
|
| 22 |
"label": "Annotation Prompt",
|
|
|
|
| 26 |
},
|
| 27 |
"annotation_output_type": {
|
| 28 |
"label": "Annotation Output Type",
|
| 29 |
+
"type": "string",
|
| 30 |
+
"options": [
|
| 31 |
+
"mask_image"
|
| 32 |
+
],
|
| 33 |
+
"value": "mask_image"
|
| 34 |
},
|
| 35 |
"annotation_overlay": {
|
| 36 |
"label": "Annotation Overlay",
|