Tweak VoiceCraft x HF integration

This PR tweaks the HF integrations:
- `VoiceCraft` tag is lowercased to `voicecraft` => not a hard requirement but makes it more consistent with other libraries on the Hub.
- `voicecraft` is set as the `library_name` instead of simply a tag. This is better for taxonomy on the Hub.

Regarding the integration, I also opened https://github.com/huggingface/huggingface.js/pull/626 to make it more official on the Hub. In particular, there will now be an official `</> Use in VoiceCraft`  button in all voicecraft models that display the code snippet to load the model. This should help users getting started with the model. It will also add a link to the voicecraft repo for the installation guide.

cc @NielsRogge who opened https://github.com/jasonppy/VoiceCraft/pull/78
This commit is contained in:
Lucain 2024-04-15 11:51:25 +02:00 committed by GitHub
parent 57079c44b6
commit 77df5104b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 2 deletions

View File

@ -1416,7 +1416,13 @@ class VoiceCraft(nn.Module):
return res, flatten_gen[0].unsqueeze(0)
class VoiceCraftHF(VoiceCraft, PyTorchModelHubMixin, repo_url="https://github.com/jasonppy/VoiceCraft", tags=["Text-to-Speech", "VoiceCraft"]):
class VoiceCraftHF(
VoiceCraft,
PyTorchModelHubMixin,
repo_url="https://github.com/jasonppy/VoiceCraft",
tags=["Text-to-Speech"],
library_name="voicecraft"
):
def __init__(self, config: dict):
args = Namespace(**config)
super().__init__(args)