Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: NextViT.__init__() got an unexpected keyword argument 'pretrained_cfg_overlay' #271

Open
DuVogel87 opened this issue Jun 15, 2024 · 3 comments

Comments

@DuVogel87
Copy link

DuVogel87 commented Jun 15, 2024

Any idea how to solve this? I am clueless. Thanks!

(midas-py310) C:\Midas\MiDaS>python run.py --model_type dpt_next_vit_large_384 --input_path "C:\Midas\MiDaS\input" --output_path "C:\Midas\MiDaS\output"
Initialize
Device: cpu
C:\Midas\MiDaS\midas\external\next_vit\classification\nextvit.py:375: UserWarning: Overwriting nextvit_small in registry with midas.external.next_vit.classification.nextvit.nextvit_small. This is because the name being registered conflicts with an existing name. Please check if this is not expected.
@register_model
C:\Midas\MiDaS\midas\external\next_vit\classification\nextvit.py:381: UserWarning: Overwriting nextvit_base in registry with midas.external.next_vit.classification.nextvit.nextvit_base. This is because the name being registered conflicts with an existing name. Please check if this is not expected.
@register_model
C:\Midas\MiDaS\midas\external\next_vit\classification\nextvit.py:387: UserWarning: Overwriting nextvit_large in registry with midas.external.next_vit.classification.nextvit.nextvit_large. This is because the name being registered conflicts with an existing name. Please check if this is not expected.
@register_model
Traceback (most recent call last):
File "C:\Midas\MiDaS\run.py", line 276, in
run(args.input_path, args.output_path, args.model_weights, args.model_type, args.optimize, args.side, args.height,
File "C:\Midas\MiDaS\run.py", line 126, in run
model, transform, net_w, net_h = load_model(device, model_path, model_type, optimize, height, square)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Midas\MiDaS\midas\model_loader.py", line 124, in load_model
model = DPTDepthModel(
^^^^^^^^^^^^^^
File "C:\Midas\MiDaS\midas\dpt_depth.py", line 160, in init
super().init(head, **kwargs)
File "C:\Midas\MiDaS\midas\dpt_depth.py", line 71, in init
self.pretrained, self.scratch = _make_encoder(
^^^^^^^^^^^^^^
File "C:\Midas\MiDaS\midas\blocks.py", line 85, in _make_encoder
pretrained = _make_pretrained_next_vit_large_6m(hooks=hooks)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Midas\MiDaS\midas\backbones\next_vit.py", line 33, in _make_pretrained_next_vit_large_6m
model = timm.create_model("nextvit_large")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Neo\anaconda3\envs\midas-py310\Lib\site-packages\timm\models_factory.py", line 117, in create_model
model = create_fn(
^^^^^^^^^^
File "C:\Midas\MiDaS\midas\external\next_vit\classification\nextvit.py", line 389, in nextvit_large
model = NextViT(stem_chs=[64, 32, 64], depths=[3, 4, 30, 3], path_dropout=0.2, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: NextViT.init() got an unexpected keyword argument 'pretrained_cfg_overlay
`

@yaningjm
Copy link

Have you solved it? @DuVogel87

@DuVogel87
Copy link
Author

Unfortunately no!

@lixingyun12139
Copy link

@DuVogel87 @yaningjm After my test, it must be ensured that the versions of timm==0.6.12 and einops==0.6.0 are correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants