mirror of
https://github.com/jasonppy/VoiceCraft.git
synced 2025-02-17 04:00:52 +01:00
better hf integration
This commit is contained in:
parent
e550f61409
commit
9dab235647
@ -203,8 +203,8 @@
|
||||
"voicecraft_name=\"giga330M.pth\" # or gigaHalfLibri330M_TTSEnhanced_max16s.pth, giga830M.pth\n",
|
||||
"\n",
|
||||
"# the new way of loading the model, with huggingface, recommended\n",
|
||||
"from models.voicecraft import VoiceCraftHF\n",
|
||||
"model = VoiceCraftHF.from_pretrained(f\"pyp1/VoiceCraft_{voicecraft_name.replace('.pth', '')}\")\n",
|
||||
"from models import voicecraft\n",
|
||||
"model = voicecraft.VoiceCraft.from_pretrained(f\"pyp1/VoiceCraft_{voicecraft_name.replace('.pth', '')}\")\n",
|
||||
"phn2num = model.args.phn2num\n",
|
||||
"config = vars(model.args)\n",
|
||||
"model.to(device)\n",
|
||||
|
@ -74,8 +74,8 @@
|
||||
"voicecraft_name=\"giga330M.pth\" # or gigaHalfLibri330M_TTSEnhanced_max16s.pth, giga830M.pth\n",
|
||||
"\n",
|
||||
"# the new way of loading the model, with huggingface, recommended\n",
|
||||
"from models.voicecraft import VoiceCraftHF\n",
|
||||
"model = VoiceCraftHF.from_pretrained(f\"pyp1/VoiceCraft_{voicecraft_name.replace('.pth', '')}\")\n",
|
||||
"from models import voicecraft\n",
|
||||
"model = voicecraft.VoiceCraft.from_pretrained(f\"pyp1/VoiceCraft_{voicecraft_name.replace('.pth', '')}\")\n",
|
||||
"phn2num = model.args.phn2num\n",
|
||||
"config = vars(model.args)\n",
|
||||
"model.to(device)\n",
|
||||
|
Loading…
x
Reference in New Issue
Block a user