Skip to content

Conversation

@ariG23498
Copy link
Contributor

The root issue for context: alexstoken/image-matching-models#45

I am trying to add more custom image matching libraries to the hub, so that we can track their download better and have more models uploaded to the Hub.

CC: @pcuenca

Copy link
Member

@Vaibhavs10 Vaibhavs10 left a comment

Choose a reason for hiding this comment

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

are these the only models affected by it? https://huggingface.co/models?other=lightglue

(should there be more?)

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.

Wondering if the download count rule is necessary. The rest looks good 👍

repoName: "LightGlue",
repoUrl: "https://github.com/cvg/LightGlue",
filter: false,
countDownloads: `path_extension:"pth"`,
Copy link
Contributor

Choose a reason for hiding this comment

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

Looking at the 5 repos in https://huggingface.co/models?other=lightglue, they all have the same structure with config.json + model.safetensors but no .pth file. Since downloads are counted by default based on config.json, the download counter is already enabled for these models (see screenshot). Is there a reason for changing that?

Image

Copy link
Contributor

Choose a reason for hiding this comment

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

Note that it's still possible to register lightblue as a library for better metadata + link to GH repo but I'd remove the download counter rule to fallback to default one:

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

@ariG23498
Copy link
Contributor Author

I see that lightglue is part of transformers which helps in building the config.json when uploaded. (@Vaibhavs10 these are the models that are uploaded to the Hub at the moment)

What I wanted to do was to upload all the checkpoints from the GitHub release to the Hub and try to track downloads from it.

@Wauplin I agree that .pth as a counter would be counter intuitive, but for the sake of making least code changes and also helping people track number of downloads, I would need to track the .pth files. What do you suggest I do here?

@pcuenca
Copy link
Member

pcuenca commented Nov 13, 2025

The counting rule is there because the original library code (here and through this popular wrapper) doesn't use the transformers implementation or a config.json file.

I would suggest to add a download counting rule that covers both cases:

		countDownloads: `path_extension:"pth" OR path:"config.json"`,

@ariG23498, if we only use path_extension:"pth" then we'd disable the counts for the other models.

@Wauplin
Copy link
Contributor

Wauplin commented Nov 13, 2025

Agree with @pcuenca on how to proceed!

@ariG23498 ariG23498 merged commit b65af39 into huggingface:main Nov 14, 2025
4 checks passed
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.

4 participants