Skip to content

Commit

Permalink
added map_location=cpu
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasd4 committed Sep 10, 2024
1 parent cd80049 commit 9f8a6ce
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions thingsvision/core/extraction/extractors.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@ def load_model_from_source(self) -> None:
# load and cache state_dict
state_dict = torch.hub.load_state_dict_from_url(
model_config["checkpoint_url"],
map_location=torch.device("cpu"),
# IMPORTANT that this is unique as it will be used for caching
file_name=unique_model_filename
)
Expand Down

0 comments on commit 9f8a6ce

Please sign in to comment.