erew123 / alltalk_tts

AllTalk is based on the Coqui TTS engine, similar to the Coqui_tts extension for Text generation webUI, however supports a variety of advanced features, such as a settings page, low VRAM support, DeepSpeed, narrator, model finetuning, custom models, wav file maintenance. It can also be used with 3rd Party software via JSON calls.
GNU Affero General Public License v3.0
1.15k stars 118 forks source link

Hi, I use colab for fine tune models but I run AllTalk locally. How can I add new models? I created a folder named ''trainedmodels'' but the UI doesn't recognize it #91

Closed arthuttupo closed 9 months ago

arthuttupo commented 9 months ago

Hi, I use colab for fine tune models but I run AllTalk locally. How can I add new models? I created a folder named ''trainedmodels'' but the UI doesn't recognize it

How to add new models? Which folder should I put it in?

erew123 commented 9 months ago

Hi @arthuttupo

It this bit of code that's looking for an extra folder+files

##################################################
#### Check to see if a finetuned model exists ####
##################################################
# Set the path to the directory
trained_model_directory = this_dir / "models" / "trainedmodel"
# Check if the directory "trainedmodel" exists
finetuned_model = trained_model_directory.exists()
# If the directory exists, check for the existence of the required files
# If true, this will add a extra option in the Gradio interface for loading Xttsv2 FT
if finetuned_model:
    required_files = ["model.pth", "config.json", "vocab.json"]
    finetuned_model = all(
        (trained_model_directory / file).exists() for file in required_files
    )

In summary, its looking for a folder alltalk_tts\models\trainedmodel\ and within that folder it will check for these 3x files existing "model.pth", "config.json", "vocab.json"

Your model.pth will be the finetuned model and you can copy the other files from the main model folder if needed.

Thanks