Skip to content

ViewCrafter_25_512 Does not Working. #74

@yunusstalha

Description

@yunusstalha

Trying to run it with 512 config and 512 model causes the following RuntimError,

    xc = torch.cat([x] + c_concat, dim=1)
RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 40 but got size 72 for tensor number 1 in the list.

And trying to solve it by changing hard coded resolutions to 320x512 (although we are giving resolutions in the arguments) results in the following error.

Warning, cannot find cuda-compiled version of RoPE2D, using a slow pytorch version instead
... loading model from ./checkpoints/DUSt3R_ViTLarge_BaseDecoder_512_dpt.pth
instantiating : AsymmetricCroCo3DStereo(enc_depth=24, dec_depth=12, enc_embed_dim=1024, dec_embed_dim=768, enc_num_heads=16, dec_num_heads=12, pos_embed='RoPE100', patch_embed_cls='PatchEmbedDust3R', img_size=(512, 512), head_type='dpt', output_mode='pts3d', depth_mode=('exp', -inf, inf), conf_mode=('exp', 1, inf), landscape_only=False)
<All keys matched successfully>
Global seed set to 123
AE working on z of shape (1, 4, 32, 32) = 4096 dimensions.
>>> model checkpoint loaded.
>> Loading a list of 2 images
 - adding /geo_loc/viewcrafter_sample/images_selected/0000005425.jpeg with resolution 1024x576 --> 512x288
 - adding /geo_loc/viewcrafter_sample/images_selected/0030005455.jpeg with resolution 1024x576 --> 512x288
 (Found 2 images)
>> Inference with model on 2 image pairs
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00,  4.72it/s]
 init edge (1*,0*) score=180.2164306640625
 init loss = 0.006728405598551035
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 300/300 [00:03<00:00, 80.78it/s, lr=3.433e-05 loss=0.0055492]
Traceback (most recent call last):
  File "/geo_loc/ViewCrafter/inference.py", line 28, in <module>
    pvd.nvs_sparse_view_interp()
  File "/geo_loc/ViewCrafter/viewcrafter.py", line 266, in nvs_sparse_view_interp
    render_results[i*(self.opts.video_length - 1)] = self.img_ori[i]
RuntimeError: The expanded size of the tensor (512) must match the existing size (1024) at non-singleton dimension 1.  Target sizes: [320, 512, 3].  Tensor sizes: [576, 1024, 3]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions