Stop extracting features when hubert_base.pt does not exist. (#535)

* support detection of pretrained model, support train without pretrained model path in web ui

* support detection of pretrained model, support train without pretrained model path in web ui

* support detection of pretrained model, support train without pretrained model path in web ui

* Stop extracting features when hubert_base.pt is not exist.

* Stop extracting features when hubert_base.pt is not exist.

* Make error more noticeable
This commit is contained in:
LINKANG ZHAN 2023-06-18 12:39:10 +08:00 committed by GitHub
parent 28383fbeee
commit c5758a89db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -63,6 +63,10 @@ def readwave(wav_path, normalize=False):
# HuBERT model
printt("load model(s) from {}".format(model_path))
# if hubert model is exist
if (os.access(model_path, os.F_OK) == False):
printt("Error: Extracting is shut down because %s does not exist, you may download it from https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main" % model_path)
exit(0)
models, saved_cfg, task = checkpoint_utils.load_model_ensemble_and_task(
[model_path],
suffix="",