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
Update block.py
Browse files
block.py
CHANGED
|
@@ -74,7 +74,7 @@ class Florence2ImageAnnotatorBlock(ModularPipelineBlocks):
|
|
| 74 |
"annotation_output_type",
|
| 75 |
type_hint=str,
|
| 76 |
default="mask_image",
|
| 77 |
-
metadata={"mellon":"
|
| 78 |
description="""Output type from annotation predictions. Availabe options are
|
| 79 |
annotation:
|
| 80 |
- raw annotation predictions from the model based on task type.
|
|
|
|
| 74 |
"annotation_output_type",
|
| 75 |
type_hint=str,
|
| 76 |
default="mask_image",
|
| 77 |
+
metadata={"mellon":"dropdown"},
|
| 78 |
description="""Output type from annotation predictions. Availabe options are
|
| 79 |
annotation:
|
| 80 |
- raw annotation predictions from the model based on task type.
|