From 77df5104b086bc6617b41359bf027dd4e543357d Mon Sep 17 00:00:00 2001 From: Lucain Date: Mon, 15 Apr 2024 11:51:25 +0200 Subject: [PATCH] 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 --- models/voicecraft.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/models/voicecraft.py b/models/voicecraft.py index 9bb3393..8811160 100644 --- a/models/voicecraft.py +++ b/models/voicecraft.py @@ -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) \ No newline at end of file + super().__init__(args)