From 7d7f6a0c369c18e8efe6f5065d6fc2bafa12eb64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E9=9B=AA=E5=B3=B0?= Date: Sat, 15 Feb 2025 21:50:11 +0800 Subject: [PATCH] set weight_only=False for eva_clip --- eva_clip/factory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eva_clip/factory.py b/eva_clip/factory.py index 5596078..c717b21 100644 --- a/eva_clip/factory.py +++ b/eva_clip/factory.py @@ -84,7 +84,7 @@ def load_state_dict(checkpoint_path: str, map_location: str='cpu', model_key: st for key in ["input_resolution", "context_length", "vocab_size"]: state_dict.pop(key, None) else: - checkpoint = torch.load(checkpoint_path, map_location=map_location) + checkpoint = torch.load(checkpoint_path, map_location=map_location, weights_only=False) for mk in model_key.split('|'): if isinstance(checkpoint, dict) and mk in checkpoint: state_dict = checkpoint[mk]