Instructions to use lodestones/Florence-2-large-ft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lodestones/Florence-2-large-ft with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "image-to-text" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("image-to-text", model="lodestones/Florence-2-large-ft", trust_remote_code=True)# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("lodestones/Florence-2-large-ft", trust_remote_code=True) model = AutoModelForImageTextToText.from_pretrained("lodestones/Florence-2-large-ft", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
| { | |
| "auto_map": { | |
| "AutoProcessor": "processing_florence2.Florence2Processor" | |
| }, | |
| "_valid_processor_keys": [ | |
| "images", | |
| "do_resize", | |
| "size", | |
| "resample", | |
| "do_rescale", | |
| "rescale_factor", | |
| "do_normalize", | |
| "image_mean", | |
| "image_std", | |
| "return_tensors", | |
| "data_format", | |
| "input_data_format", | |
| "do_convert_rgb" | |
| ], | |
| "do_convert_rgb": null, | |
| "do_normalize": true, | |
| "do_rescale": true, | |
| "do_resize": true, | |
| "do_center_crop": false, | |
| "image_processor_type": "CLIPImageProcessor", | |
| "image_seq_length": 577, | |
| "image_mean": [0.485, 0.456, 0.406], | |
| "image_std": [0.229, 0.224, 0.225], | |
| "processor_class": "Florence2Processor", | |
| "resample": 3, | |
| "size": { | |
| "height": 768, | |
| "width":768 | |
| }, | |
| "crop_size": { | |
| "height": 768, | |
| "width": 768 | |
| } | |
| } |