-
Notifications
You must be signed in to change notification settings - Fork 441
Add support for mochi-1-preview (genmo) to huggingface.js #981
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for the contribution (and the release) 🔥
@@ -680,6 +680,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = { | |||
filter: false, | |||
countDownloads: `path_extension:"safetensors" OR path_extension:"pt"`, | |||
}, | |||
"mochi-1-preview": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a question: isn't this too specific? Should it just be "mochi" or "mochi-1"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a good understanding of how libraries work (e.g, how is this linked to the actual huggingface page). I named it after the hugging face repository: https://huggingface.co/genmo/mochi-1-preview. But let me know if it should be called something else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It depend how you think the library will evolve. The name should match the library name from the model card metadata (here) which is currently library_name: mochi-1-preview
. But it doesn't have to match the model repo id.
If the goal of the Python library on Github is to support this first preview
version and then maybe some other versions or finetunes, then I would advice to chose mochi-1
for instance (as @pcuenca suggested). You can see the library as a family of models, not just one. If we go with mochi-1-preview
, it means that either all other models will have to be tagged as mochi-1-preview
or that we will have to add support for a new library tag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with @Wauplin's comments. You can see examples of libraries in this file, they include obvious ones such as transformers
, but also smaller and more specific ones, for example https://huggingface.co/models?library=depth-anything-v2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, so this is enabling download counting for an entire library. Which means whatever file path I specify here should be found in all models. To be honest, I don't know if vae_stats.json
will exist in all possible HuggingFace repositories. But, I guess we can update the elastic search query in the future.
For context, the Python library is going to support all Genmo models ever created. So, a huge variety of models.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I should rename the library to just "genmo"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! Just genmo
would be more cleaner and also make this PR forward compatible too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
genmo
's good in that case!
Since it will be compatible with a large variety of models, it could be nice to have at least a form of similar structure between models. Typically, you could add a config.json
file with minimal information about the model, its architecture and what it is used for. If all genmo models has one, it might help the library + it will allow us to count the downloads in a consistent way. (I didn't chose the example randomly, config.json
is actually the default file we are counting downloads from).
But this can be done in a later PR, once you have at least 2 genmo models.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, I updated the repository to have the library "genmo": https://huggingface.co/genmo/mochi-1-preview.
I also updated the library name to genmo.
If there are any small nits, do you want to just do the commits and merge? I'm super un-opinionated here, and just want to get download tracking for our repository enabled.
@@ -680,6 +680,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = { | |||
filter: false, | |||
countDownloads: `path_extension:"safetensors" OR path_extension:"pt"`, | |||
}, | |||
"mochi-1-preview": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It depend how you think the library will evolve. The name should match the library name from the model card metadata (here) which is currently library_name: mochi-1-preview
. But it doesn't have to match the model repo id.
If the goal of the Python library on Github is to support this first preview
version and then maybe some other versions or finetunes, then I would advice to chose mochi-1
for instance (as @pcuenca suggested). You can see the library as a family of models, not just one. If we go with mochi-1-preview
, it means that either all other models will have to be tagged as mochi-1-preview
or that we will have to add support for a new library tag.
Co-authored-by: Lucain <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I can see that the original repo also has the same tag: https://huggingface.co/models?other=genmo
We can make the integration better re: download tracking if/ when you release other model checkpoints! Thanks for opening the PR 🤗
Let's wait for one more LGTM and then we can merge!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one more LGTM! Thanks @ved-genmo 🤗
I merged the PR. You can expect to see it deployed in the next few days. |
Add mochi-1-preview to huggingface.js.