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

RuntimeError: Cannot find callable cotracker2v1 in hubconf #107

Open
Fisher-Wang opened this issue Oct 9, 2024 · 1 comment
Open

RuntimeError: Cannot find callable cotracker2v1 in hubconf #107

Fisher-Wang opened this issue Oct 9, 2024 · 1 comment

Comments

@Fisher-Wang
Copy link

Thank you for the Cotrakcer v2.1 update!

However when I run the script in README, it run into error.

For offline mode:

Using cache found in /home/xxx/.cache/torch/hub/facebookresearch_co-tracker_main
Traceback (most recent call last):
  File "/home/xxx/cod/ego4d_process/src/third_party/co-tracker/quickstart2.py", line 15, in <module>
    cotracker = torch.hub.load("facebookresearch/co-tracker", "cotracker2v1").to(device)
  File "/home/xxx/miniforge3/envs/cotracker/lib/python3.10/site-packages/torch/hub.py", line 570, in load
    model = _load_local(repo_or_dir, model, *args, **kwargs)
  File "/home/xxx/miniforge3/envs/cotracker/lib/python3.10/site-packages/torch/hub.py", line 598, in _load_local
    entry = _load_entry_from_hubconf(hub_module, model)
  File "/home/xxx/miniforge3/envs/cotracker/lib/python3.10/site-packages/torch/hub.py", line 349, in _load_entry_from_hubconf
    raise RuntimeError(f'Cannot find callable {model} in hubconf')
RuntimeError: Cannot find callable cotracker2v1 in hubconf

For online mode:

Using cache found in /home/xxx/.cache/torch/hub/facebookresearch_co-tracker_main
Traceback (most recent call last):
  File "/home/xxx/cod/ego4d_process/src/third_party/co-tracker/online.py", line 14, in <module>
    cotracker = torch.hub.load("facebookresearch/co-tracker", "cotracker2v1_online").to(
  File "/home/xxx/miniforge3/envs/cotracker/lib/python3.10/site-packages/torch/hub.py", line 570, in load
    model = _load_local(repo_or_dir, model, *args, **kwargs)
  File "/home/xxx/miniforge3/envs/cotracker/lib/python3.10/site-packages/torch/hub.py", line 598, in _load_local
    entry = _load_entry_from_hubconf(hub_module, model)
  File "/home/xxx/miniforge3/envs/cotracker/lib/python3.10/site-packages/torch/hub.py", line 349, in _load_entry_from_hubconf
    raise RuntimeError(f'Cannot find callable {model} in hubconf')
RuntimeError: Cannot find callable cotracker2v1_online in hubconf
@lvoursl
Copy link
Contributor

lvoursl commented Oct 14, 2024

Hey @Fisher-Wang !

Just to confirm: have you cloned the latest version of the repo and getting this error?

As a first solution that comes to mind: it seems torch.hub has cached the previous version of the hubconf, so you have clean cache and try running demo again.

Just try: rm -rf /home/xxx/.cache/torch/hub/facebookresearch_co-tracker_main to clean cache and then run your code again. It should get fresh snapshot from the repo and download fresh models.

Let us know if it works!

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

2 participants