Skip to content

Commit a383ef9

Browse files
committed
Make huggingface_hub necessary if it's the only source for a pretrained weight
1 parent d199f66 commit a383ef9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

timm/models/helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def _resolve_pretrained_source(pretrained_cfg):
134134
elif pretrained_url:
135135
load_from = 'url'
136136
pretrained_loc = pretrained_url
137-
elif hf_hub_id and has_hf_hub(necessary=False):
137+
elif hf_hub_id and has_hf_hub(necessary=True):
138138
# hf-hub available as alternate weight source in default_cfg
139139
load_from = 'hf-hub'
140140
pretrained_loc = hf_hub_id

0 commit comments

Comments
 (0)