Instructions to use mobilint/blip-image-captioning-large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mobilint/blip-image-captioning-large 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="mobilint/blip-image-captioning-large", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("mobilint/blip-image-captioning-large", trust_remote_code=True, device_map="auto") - Mobilint
How to use mobilint/blip-image-captioning-large with Mobilint:
# pip install mblt-model-zoo from mblt_model_zoo.vision import MBLT_Engine model = MBLT_Engine( model_cls="blip-image-captioning-large", model_type="DEFAULT", model_path="", core_mode="global8", ) try: image = model.preprocess("path/to/image.jpg") output = model(image) result = model.postprocess(output) finally: model.dispose() - Notebooks
- Google Colab
- Kaggle
Adjust library_name metadata for model card
Browse files
README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
---
|
| 2 |
-
library_name:
|
| 3 |
license: bsd-3-clause
|
| 4 |
base_model:
|
| 5 |
- Salesforce/blip-image-captioning-large
|
|
|
|
| 1 |
---
|
| 2 |
+
library_name: transformers
|
| 3 |
license: bsd-3-clause
|
| 4 |
base_model:
|
| 5 |
- Salesforce/blip-image-captioning-large
|