Image-to-Text
Transformers
Safetensors
English
vision-encoder-decoder
image-text-to-text
captioning
paintings
art
wikiart
Instructions to use AterMors/Swin2-GTP2_art-caption with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AterMors/Swin2-GTP2_art-caption 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="AterMors/Swin2-GTP2_art-caption")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("AterMors/Swin2-GTP2_art-caption") model = AutoModelForMultimodalLM.from_pretrained("AterMors/Swin2-GTP2_art-caption", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 119 Bytes
9e89596 | 1 2 3 4 5 6 7 | {
"_from_model_config": true,
"bos_token_id": 50256,
"eos_token_id": 50256,
"transformers_version": "4.40.1"
}
|