SwinTransformer / MIM-Depth-Estimation

This is an official implementation of our CVPR 2023 paper "Revealing the Dark Secrets of Masked Image Modeling" on Depth Estimation.
MIT License
158 stars 11 forks source link

load model error #13

Closed Aokiji996 closed 3 months ago

Aokiji996 commented 3 months ago

When I try to load model by model = DepthAnything.from_pretrained("depth_anything_{:}14".format(args.encoder)), it occurs that

Traceback (most recent call last):
  File "./models/depth_anything/dpt.py", line 183, in <module>
    model = DepthAnything.from_pretrained("depth_anything_{:}14".format(args.encoder))
  File "/home/aokiji/anaconda3/envs/go-slam/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
    return fn(*args, **kwargs)
  File "/home/aokiji/anaconda3/envs/go-slam/lib/python3.8/site-packages/huggingface_hub/hub_mixin.py", line 277, in from_pretrained
    instance = cls._from_pretrained(
  File "/home/aokiji/anaconda3/envs/go-slam/lib/python3.8/site-packages/huggingface_hub/hub_mixin.py", line 485, in _from_pretrained
    model = cls(**model_kwargs)
TypeError: __init__() missing 1 required positional argument: 'config'

I'm sure that the pth in the right path.

Aokiji996 commented 3 months ago

sorry for this, I make a mistake