mirror of
https://github.com/huggingface/pytorch-image-models.git
synced 2025-06-03 15:01:08 +08:00
Make huggingface_hub necessary if it's the only source for a pretrained weight
This commit is contained in:
parent
d199f6651d
commit
a383ef99f5
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user