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

Add cosmos library #1089

Merged
merged 2 commits into from
Jan 8, 2025
Merged

Add cosmos library #1089

merged 2 commits into from
Jan 8, 2025

Conversation

pcuenca
Copy link
Member

@pcuenca pcuenca commented Jan 7, 2025

This enables downloads once these models are assigned the cosmos library. Snippets can come later.

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.

Nice! Thanks! Should be much more easier to have snippets once/ if in transformers.

@Haoxiang-Wang
Copy link

Thank you @pcuenca !

I am the Cosmos team member who is in charge of our model uploading to Hugging Face Hub. I noticed most of our Cosmos-1.0 models have no download statistics counted yet (see the screenshot below), which concerns us.

@Vaibhavs10 @julien-c Please merge this MR as soon as possible, and I will tag all Cosmos-1.0 models with the cosmos library. I think this can turn on the download counter, right?

cosmos-downloads

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.

Hi @Haoxiang-Wang - It should merge today, note after the PR is merged and after a deployment. It'd take 24-48 hours for download counters to come in effect.

and, yes, please do update the library_name to cosmos 🤗

@pcuenca
Copy link
Member Author

pcuenca commented Jan 8, 2025

Thanks for the confirmation @Haoxiang-Wang, merging now. This is an example PR to update the repos: https://huggingface.co/nvidia/Cosmos-1.0-Diffusion-7B-Text2World/discussions/1/files

@pcuenca pcuenca merged commit 3c3c008 into main Jan 8, 2025
5 checks passed
@pcuenca pcuenca deleted the cosmos-library branch January 8, 2025 08:00
prettyLabel: "Cosmos",
repoName: "Cosmos",
repoUrl: "https://github.com/NVIDIA/Cosmos",
countDownloads: `path:"config.json" OR 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.

@pcuenca Aren't we counting download twice here? I've checked repos under https://huggingface.co/models?other=cosmos and they seem to have the config.json file. And a lot have a model.pt file while others have .pth files in subdirectories. Any way we could update the download count rule to account for all differences ?

@@ -166,6 +166,12 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
filter: false,
countDownloads: `path:"adapter_config.json"`,
},
cosmos: {
Copy link
Contributor

Choose a reason for hiding this comment

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

Unrelated to this PR but are these models supposed to be usable with Nemo ? Since they are tagged as "nemo", there is a "use this model" snippet in all of them but with empty snippets. This is due to the fact that the nemo code snippet generator is incomplete (see here

export const nemo = (model: ModelData): string[] => {
and
const nemoDomainResolver = (domain: string, model: ModelData): string[] | undefined => {
). @Haoxiang-Wang @pcuenca would it make sense to open a separate PR to complete the snippets?

@pcuenca
Copy link
Member Author

pcuenca commented Jan 13, 2025

Hi @Wauplin, we took a quick look with @ariG23498 to create a Cosmos-based snippet, but it was not immediately obvious so we decided to tackle it later. Happy to revisit! I believe that the compatibility with nemo in some of these models comes from the existence of a nemo subfolder, such as in this model. If that's the case, there's a similar discussion in a related PR about potentially considering whether to split those repos.

Other models, however, do not contain a nemo folder but still have the tag.

Additional guidance from @Haoxiang-Wang would be super helpful here.

@Wauplin
Copy link
Contributor

Wauplin commented Jan 13, 2025

Ok, thanks for the context. About nemo tags it comes from the model card metadata itself. Example with Cosmos-1.0-Autoregressive-4B which is true has a nemo/ folder but it especially has nemo in its metadata. Same for your other example. In this case cosmos is considered as the main library for download counts and both cosmos and nemo are considered to be libraries for "use this model" snippet. In this case only Nemo has one (which is not really helpful in this case, hence my comment).

I'm also inclined to split repos if a models has different file structure for different libraries.

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.

5 participants