Update I-JEPA checkpoints path (#35120)

Update checkpoints path
This commit is contained in:
Pavel Iakubovskii 2024-12-06 13:42:51 +00:00 committed by GitHub
parent 7f95372c62
commit c8c8dffbe4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 7 deletions

View File

@ -45,7 +45,7 @@ url_2 = "http://images.cocodataset.org/val2017/000000219578.jpg"
image_1 = Image.open(requests.get(url_1, stream=True).raw)
image_2 = Image.open(requests.get(url_2, stream=True).raw)
model_id = "jmtzt/ijepa_vith14_1k"
model_id = "facebook/ijepa_vith14_1k"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModel.from_pretrained(model_id)

View File

@ -155,7 +155,7 @@ class IJepaModel(IJepaPreTrainedModel, ViTModel):
self.embeddings = IJepaEmbeddings(config, use_mask_token=use_mask_token)
_IMAGE_CLASS_CHECKPOINT = "jmtzt/ijepa_vith14_1k"
_IMAGE_CLASS_CHECKPOINT = "facebook/ijepa_vith14_1k"
_IMAGE_CLASS_EXPECTED_OUTPUT = "Egyptian cat"

View File

@ -250,7 +250,7 @@ class IJepaModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
@slow
def test_model_from_pretrained(self):
model_name = "jmtzt/ijepa_vith14_1k"
model_name = "facebook/ijepa_vith14_1k"
model = IJepaModel.from_pretrained(model_name)
self.assertIsNotNone(model)
@ -266,11 +266,11 @@ def prepare_img():
class IJepaModelIntegrationTest(unittest.TestCase):
@cached_property
def default_image_processor(self):
return ViTImageProcessor.from_pretrained("jmtzt/ijepa_vith14_1k") if is_vision_available() else None
return ViTImageProcessor.from_pretrained("facebook/ijepa_vith14_1k") if is_vision_available() else None
@slow
def test_inference_no_head(self):
model = IJepaModel.from_pretrained("jmtzt/ijepa_vith14_1k").to(torch_device)
model = IJepaModel.from_pretrained("facebook/ijepa_vith14_1k").to(torch_device)
image_processor = self.default_image_processor
image = prepare_img()
@ -299,7 +299,7 @@ class IJepaModelIntegrationTest(unittest.TestCase):
A small test to make sure that inference work in half precision without any problem.
"""
model = IJepaModel.from_pretrained(
"jmtzt/ijepa_vith14_1k",
"facebook/ijepa_vith14_1k",
torch_dtype=torch.float16,
device_map="auto",
)
@ -319,7 +319,7 @@ class IJepaModelIntegrationTest(unittest.TestCase):
# allowing to interpolate the pre-trained position embeddings in order to use
# the model on higher resolutions. The DINO model by Facebook AI leverages this
# to visualize self-attention on higher resolution images.
model = IJepaModel.from_pretrained("jmtzt/ijepa_vith14_1k").to(torch_device)
model = IJepaModel.from_pretrained("facebook/ijepa_vith14_1k").to(torch_device)
image_processor = self.default_image_processor
image = prepare_img()