I download the 'dinov2_vitl14_reg4_pretrain.pth' locally and use the 'vit_large' function to build model. I run the following code. But get the error "RuntimeError: PytorchStreamReader failed reading file data/12: invalid header or archive is corrupted"
from dinov2.models.vision_transformer import vit_large
model = vit_large(
patch_size=14,
img_size=518,
init_values=1.0,
block_chunks=0,
num_register_tokens=4)
state_dict = torch.load('checkpoint/dinov2_vitl14_reg4_pretrain.pth', map_location='cpu')
model.load_state_dict(state_dict, strict=False)
I download the 'dinov2_vitl14_reg4_pretrain.pth' locally and use the 'vit_large' function to build model. I run the following code. But get the error "RuntimeError: PytorchStreamReader failed reading file data/12: invalid header or archive is corrupted"