diff --git a/timm/models/hub.py b/timm/models/hub.py index 69365a0c..9a9b5530 100644 --- a/timm/models/hub.py +++ b/timm/models/hub.py @@ -61,8 +61,8 @@ def has_hf_hub(necessary=False): def hf_split(hf_id): - rev_split = hf_id.split('#') - assert 0 < len(rev_split) <= 2, 'hf_hub id should only contain one # character to identify revision.' + rev_split = hf_id.split('@') + assert 0 < len(rev_split) <= 2, 'hf_hub id should only contain one @ character to identify revision.' hf_model_id = rev_split[0] hf_revision = rev_split[-1] if len(rev_split) > 1 else None return hf_model_id, hf_revision diff --git a/timm/models/nfnet.py b/timm/models/nfnet.py index 90406e66..c037c7ec 100644 --- a/timm/models/nfnet.py +++ b/timm/models/nfnet.py @@ -106,6 +106,7 @@ default_cfgs = dict( url='', pool_size=(7, 7), input_size=(3, 224, 224), test_input_size=(3, 288, 288)), eca_nfnet_l0=_dcfg( url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/ecanfnet_l0_ra2-e3e9ac50.pth', + hf_hub='timm/eca_nfnet_l0', pool_size=(7, 7), input_size=(3, 224, 224), test_input_size=(3, 288, 288), crop_pct=1.0), nf_regnet_b0=_dcfg(