MiDaS icon indicating copy to clipboard operation
MiDaS copied to clipboard

Error loading model with timm==0.9.7

Open lzqsd opened this issue 1 year ago • 1 comments

Hi there,

I tried to load the pretrained model but met an error "Unexpected key(s) in state_dict: "pretrained.model.blocks.0.attn.relative_position_index", ....". I found that this error only happened with timm=0.9.7 and would be gone with timm==0.6.7. I wonder if there is any plan to support the newest timm. Thanks!

lzqsd avatar Oct 10 '23 07:10 lzqsd

I can load the model again by removing all item in weight containing "relative_position_index".

lzqsd avatar Oct 26 '23 22:10 lzqsd