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", 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
CHANGED
|
@@ -7,18 +7,18 @@
|
|
| 7 |
"params": {
|
| 8 |
"image": {
|
| 9 |
"label": "Image",
|
| 10 |
-
"type": "
|
| 11 |
"display": "input"
|
| 12 |
},
|
| 13 |
"annotation_task": {
|
| 14 |
"label": "Annotation Task",
|
| 15 |
-
"type": "
|
| 16 |
-
"display": "input"
|
| 17 |
},
|
| 18 |
"annotation_prompt": {
|
| 19 |
"label": "Annotation Prompt",
|
| 20 |
-
"type": "
|
| 21 |
-
"display": "
|
|
|
|
| 22 |
},
|
| 23 |
"annotation_output_type": {
|
| 24 |
"label": "Annotation Output Type",
|
|
@@ -27,8 +27,8 @@
|
|
| 27 |
},
|
| 28 |
"annotation_overlay": {
|
| 29 |
"label": "Annotation Overlay",
|
| 30 |
-
"type": "
|
| 31 |
-
"
|
| 32 |
},
|
| 33 |
"fill": {
|
| 34 |
"label": "Fill",
|
|
@@ -52,7 +52,7 @@
|
|
| 52 |
},
|
| 53 |
"images": {
|
| 54 |
"label": "Images",
|
| 55 |
-
"type": "
|
| 56 |
"display": "output"
|
| 57 |
},
|
| 58 |
"doc": {
|
|
|
|
| 7 |
"params": {
|
| 8 |
"image": {
|
| 9 |
"label": "Image",
|
| 10 |
+
"type": "image",
|
| 11 |
"display": "input"
|
| 12 |
},
|
| 13 |
"annotation_task": {
|
| 14 |
"label": "Annotation Task",
|
| 15 |
+
"type": "string"
|
|
|
|
| 16 |
},
|
| 17 |
"annotation_prompt": {
|
| 18 |
"label": "Annotation Prompt",
|
| 19 |
+
"type": "string",
|
| 20 |
+
"display": "textarea",
|
| 21 |
+
"default": ""
|
| 22 |
},
|
| 23 |
"annotation_output_type": {
|
| 24 |
"label": "Annotation Output Type",
|
|
|
|
| 27 |
},
|
| 28 |
"annotation_overlay": {
|
| 29 |
"label": "Annotation Overlay",
|
| 30 |
+
"type": "boolean",
|
| 31 |
+
"default": false
|
| 32 |
},
|
| 33 |
"fill": {
|
| 34 |
"label": "Fill",
|
|
|
|
| 52 |
},
|
| 53 |
"images": {
|
| 54 |
"label": "Images",
|
| 55 |
+
"type": "image",
|
| 56 |
"display": "output"
|
| 57 |
},
|
| 58 |
"doc": {
|