Open sparkleMing opened 1 year ago
Sadly I won't have time to look more into it here - happy to review a PR though :-)
Sadly I won't have time to look more into it here - happy to review a PR though :-)
I have tried replace the drop_path with drop_path1 directly, which hint by the error message, and it works, but i don't know why.
I have the same error
You can use an older timm
version (e.g. 0.6.x)
File "/home/ubuntu/.local/lib/python3.10/site-packages/controlnet_aux/zoe/zoedepth/models/depth_model.py", line 126, in infer return self.infer_with_flip_aug(x, pad_input=pad_input, kwargs) File "/home/ubuntu/.local/lib/python3.10/site-packages/controlnet_aux/zoe/zoedepth/models/depth_model.py", line 110, in infer_with_flip_aug out = self._infer_with_pad_aug(x, pad_input=pad_input, kwargs) File "/home/ubuntu/.local/lib/python3.10/site-packages/controlnet_aux/zoe/zoedepth/models/depth_model.py", line 88, in _infer_with_pad_aug out = self._infer(x) File "/home/ubuntu/.local/lib/python3.10/site-packages/controlnet_aux/zoe/zoedepth/models/depth_model.py", line 55, in _infer return self(x)['metric_depth'] File "/home/ubuntu/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(*args, kwargs) File "/home/ubuntu/.local/lib/python3.10/site-packages/controlnet_aux/zoe/zoedepth/models/zoedepth/zoedepth_v1.py", line 144, in forward rel_depth, out = self.core(x, denorm=denorm, return_rel_depth=True) File "/home/ubuntu/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(*args, *kwargs) File "/home/ubuntu/.local/lib/python3.10/site-packages/controlnet_aux/zoe/zoedepth/models/base_models/midas.py", line 269, in forward rel_depth = self.core(x) File "/home/ubuntu/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(args, kwargs) File "/home/ubuntu/.local/lib/python3.10/site-packages/controlnet_aux/zoe/zoedepth/models/base_models/midas_repo/midas/dpt_depth.py", line 166, in forward return super().forward(x).squeeze(dim=1) File "/home/ubuntu/.local/lib/python3.10/site-packages/controlnet_aux/zoe/zoedepth/models/base_models/midas_repo/midas/dpt_depth.py", line 114, in forward layers = self.forward_transformer(self.pretrained, x) File "/home/ubuntu/.local/lib/python3.10/site-packages/controlnet_aux/zoe/zoedepth/models/base_models/midas_repo/midas/backbones/beit.py", line 15, in forward_beit return forward_adapted_unflatten(pretrained, x, "forward_features") File "/home/ubuntu/.local/lib/python3.10/site-packages/controlnet_aux/zoe/zoedepth/models/base_models/midas_repo/midas/backbones/utils.py", line 86, in forward_adapted_unflatten exec(f"glob = pretrained.model.{function_name}(x)") File "", line 1, in
File "/home/ubuntu/.local/lib/python3.10/site-packages/controlnet_aux/zoe/zoedepth/models/base_models/midas_repo/midas/backbones/beit.py", line 125, in beit_forward_features
x = blk(x, resolution, shared_rel_pos_bias=rel_pos_bias)
File "/home/ubuntu/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, *kwargs)
File "/home/ubuntu/.local/lib/python3.10/site-packages/controlnet_aux/zoe/zoedepth/models/base_models/midas_repo/midas/backbones/beit.py", line 102, in block_forward
x = x + self.drop_path(self.gamma_1 self.attn(self.norm1(x), resolution,
File "/home/ubuntu/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1614, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'Block' object has no attribute 'drop_path'. Did you mean: 'drop_path1'?