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

when runing demo_gr.py img_size[0] % patch_size == 0 and img_size[1] % patch_size == 0 TypeError: 'int' object is not subscriptable #44

Open
cajstudy opened this issue Mar 31, 2025 · 0 comments

Comments

@cajstudy
Copy link

python demo_gr.py
{'img_size': 224, 'patch_size': 16, 'mask_ratio': 0.9, 'enc_embed_dim': 768, 'enc_depth': 12, 'enc_num_heads': 12, 'dec_embed_dim': 512, 'dec_depth': 8, 'dec_num_heads': 16, 'mlp_ratio': 4, 'norm_layer': functools.partial(<class 'torch.nn.modules.normalization.LayerNorm'>, eps=1e-06), 'norm_im2_in_dec': True, 'pos_embed': 'cosine'}
Traceback (most recent call last):
File "/home/jsj/桌面/gs/stable-virtual-camera/third_party/dust3r/dust3r/model.py", line 100, in from_pretrained
model = super(AsymmetricCroCo3DStereo, cls).from_pretrained(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jsj/conda/envs/stable-virtual-camera/lib/python3.11/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/home/jsj/conda/envs/stable-virtual-camera/lib/python3.11/site-packages/huggingface_hub/hub_mixin.py", line 553, in from_pretrained
instance = cls._from_pretrained(
^^^^^^^^^^^^^^^^^^^^^
File "/home/jsj/conda/envs/stable-virtual-camera/lib/python3.11/site-packages/huggingface_hub/hub_mixin.py", line 774, in _from_pretrained
model = cls(**model_kwargs)
^^^^^^^^^^^^^^^^^^^
File "/home/jsj/桌面/gs/stable-virtual-camera/third_party/dust3r/dust3r/model.py", line 84, in init
self.set_downstream_head(
File "/home/jsj/桌面/gs/stable-virtual-camera/third_party/dust3r/dust3r/model.py", line 149, in set_downstream_head
img_size[0] % patch_size == 0 and img_size[1] % patch_size == 0
~~~~~~~~^^^
TypeError: 'int' object is not subscriptable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/jsj/桌面/gs/stable-virtual-camera/demo_gr.py", line 108, in
DUST3R = Dust3rPipeline(device=device) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jsj/桌面/gs/stable-virtual-camera/seva/modules/preprocessor.py", line 37, in init
self.model = AsymmetricCroCo3DStereo.from_pretrained(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jsj/桌面/gs/stable-virtual-camera/third_party/dust3r/dust3r/model.py", line 104, in from_pretrained
raise Exception(
Exception: tried to load naver/DUSt3R_ViTLarge_BaseDecoder_512_dpt from huggingface, but failed

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

1 participant