File size: 335 Bytes
6c84b4c
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
from transformers import AutoImageProcessor, AutoModel

if __name__ == "__main__":
    model_name = "facebook/dinov2-base"
    processor = AutoImageProcessor.from_pretrained(model_name)
    model = AutoModel.from_pretrained(model_name)

    # save pretrained
    processor.save_pretrained("dinov2")
    model.save_pretrained("dinov2")