hi @sgugger , I’m trying this code
model = VisionTextDualEncoderModel.from_vision_text_pretrained(
"openai/clip-vit-base-patch32", "openai/clip-vit-base-patch32"
)
tokenizer = AutoTokenizer.from_pretrained("openai/clip-vit-base-patch32")
image_processor = AutoImageProcessor.from_pretrained("openai/clip-vit-base-patch32")
processor = VisionTextDualEncoderProcessor(image_processor, tokenizer)
# save the model and processor
model.save_pretrained("clip-finetuned")
processor.save_pretrained("clip-finetuned")
from transformers/examples/pytorch/contrastive-image-text at main · huggingface/transformers · GitHub
but i have this error:
OSError: roberta-base does not appear to have a file named preprocessor_config.json. Checkout ‘https://huggingface.co/roberta-base/main’ for available files.
Can u give me a help?