Skip to content

Commit

Permalink
Make huggingface_hub necessary if it's the only source for a pretrain…
Browse files Browse the repository at this point in the history
…ed weight
  • Loading branch information
rwightman committed Sep 23, 2022
1 parent d199f66 commit a383ef9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion timm/models/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def _resolve_pretrained_source(pretrained_cfg):
elif pretrained_url:
load_from = 'url'
pretrained_loc = pretrained_url
elif hf_hub_id and has_hf_hub(necessary=False):
elif hf_hub_id and has_hf_hub(necessary=True):
# hf-hub available as alternate weight source in default_cfg
load_from = 'hf-hub'
pretrained_loc = hf_hub_id
Expand Down

0 comments on commit a383ef9

Please sign in to comment.