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

Added CoTracker for download stats #925

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

lvoursl
Copy link

@lvoursl lvoursl commented Sep 23, 2024

Hey!

Thanks for the amazing library :)

We are hosting CoTracker model checkpoint here and would like to see the download count. This PR follows this one to enable it.

Hope it's correct way to do it, let me know if any changes are needed or there is a better way to do so.

Copy link
Member

@osanseviero osanseviero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! It LGTM.

Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Would be a good occasion to update CoTracker's GitHub README and HF Model Card to showcase how to load the model from the Hugging Face Hub directly. For now it's showcasing

cotracker = torch.hub.load("facebookresearch/co-tracker", "cotracker2").to(device)

which doesn't use the HF built-in cache system (though it's pulling from HF from what I can see in the hubconf.py)

If that can help, here is a guide on how to download files using huggingface_hub.

packages/tasks/src/model-libraries.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes @lvoursl! I noticed two things to update before merging, otherwise we should be good to go :)

repoName: "CoTracker",
repoUrl: "https://github.com/facebookresearch/co-tracker",
filter: false,
countDownloads: `path_extension:"pt"`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
countDownloads: `path_extension:"pt"`,
countDownloads: `path_extension:"pth"`,

I just noticed the file extension is not pt but pth in https://huggingface.co/facebook/cotracker/tree/main.

@@ -715,6 +715,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
countDownloads: `path:"model_vae_fp16.pt"`,
snippets: snippets.threedtopia_xl,
},
cotracker: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you move this entry up in the mapping to keep it consistent with the alphabetical order. Thanks!

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

Successfully merging this pull request may close these issues.

3 participants