Skip to content

Commit

Permalink
🐛 Fix clip device (#2560)
Browse files Browse the repository at this point in the history
  • Loading branch information
huchenlei authored Jan 23, 2024
1 parent fc3b521 commit f1f9493
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions annotator/clipvision/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ def __init__(self, config, low_vram: bool):
sd = torch.load(file_path, map_location=self.device)
self.model.load_state_dict(sd, strict=False)
del sd
self.model.to(self.device)
self.model.eval()

def unload_model(self):
Expand Down

0 comments on commit f1f9493

Please sign in to comment.