neggles / wdv3-timm

22 stars 9 forks source link

[Bug] Cannot load hf models #3

Closed curiousjp closed 5 months ago

curiousjp commented 6 months ago

Hello -

I'm not sure if this is a quirk of my system, but here timm.list_pretrained returns a list of model names, and as such cannot be .eval()'d to produce a model object on line 127 of wdv3_timm.py. (It also returns an empty list even when an hf-hub: prefix is passed as the filter argument, at least from a cold install.)

Should this line instead be model: nn.Module = timm.create_model("hf-hub:" + repo_id, pretrained=True) as described in the timm examples on huggingface?

neggles commented 5 months ago

Yes, yes it should. I do not know how I missed that... Will fix, sorry for the delay!