huggingface/pytorch-image-models

[BUG] Cannot load pretrained ConvNext model

Closed this issue · 1 comments

Describe the bug
I got this error when I load the pretrained ConvNext model from timm models.

TypeError: ConvNeXt.__init__() got an unexpected keyword argument 'pretrained_cfg'

To Reproduce
Steps to reproduce the behavior:

import timm
convnext = timm.create_model('convnext_base.fb_in1k', pretrained=True)

Desktop (please complete the following information):

  • OS: Windows 10
  • timm 1.0.9
  • Pytorch 2.3.1 + CUDA 12.1

Please help me to solve this problem.
Thank you and best regards!

@viet2411 you should check your environment, probably isn't timm 1.0.9 that you have installed, maybe uninstall timm and install again