Skip to content

Error demo_match.py #142

@IceIce1ce

Description

@IceIce1ce

Hi author, thanks for your great code. When I run your demo script, an error occurred. Can you check your code again?

2025-11-21 21:55:56.728 | INFO | romatch.models.model_zoo.roma_models:roma_model:61 - Using coarse resolution (560, 560), and upsample res (864, 1152)
Traceback (most recent call last):
File "/home/vsw/Desktop/RoMa/demo/demo_match.py", line 41, in
im2_transfer_rgb = F.grid_sample(
^^^^^^^^^^^^^^
File "/home/vsw/miniconda3/envs/map/lib/python3.12/site-packages/torch/nn/functional.py", line 5108, in grid_sample
return torch.grid_sampler(input, grid, mode_enum, padding_mode_enum, align_corners)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: grid_sampler(): expected grid to have size 2 in last dimension, but got grid with sizes [1, 1, 864, 2302, 4]

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