From 551aca347511f782a0f3980e93603194a539e853 Mon Sep 17 00:00:00 2001 From: Jong Wook Kim Date: Mon, 16 Oct 2023 15:47:21 -0700 Subject: [PATCH] Fixes #396 --- clip/clip.py | 1 + 1 file changed, 1 insertion(+) diff --git a/clip/clip.py b/clip/clip.py index f7a5da5e6..9f7ddfa68 100644 --- a/clip/clip.py +++ b/clip/clip.py @@ -133,6 +133,7 @@ def load(name: str, device: Union[str, torch.device] = "cuda" if torch.cuda.is_a if jit: warnings.warn(f"File {model_path} is not a JIT archive. Loading as a state dict instead") jit = False + opened_file.seek(0) state_dict = torch.load(opened_file, map_location="cpu") if not jit: