From e5bb317242274d9d59e2e9d74301c3fdf920934e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eren=20G=C3=B6lge?= Date: Wed, 10 Mar 2021 17:01:19 +0100 Subject: [PATCH] fix model manager --- TTS/utils/manage.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/TTS/utils/manage.py b/TTS/utils/manage.py index 316e3a1893..b2b93eace1 100644 --- a/TTS/utils/manage.py +++ b/TTS/utils/manage.py @@ -104,7 +104,7 @@ def download_model(self, model_name): else: os.makedirs(output_path, exist_ok=True) print(f" > Downloading model to {output_path}") - output_stats_path = None + output_stats_path = os.path.join(output_path, 'scale_stats.npy') # download files to the output path if self._check_dict_key(model_item, 'github_rls_url'): # download from github release @@ -118,8 +118,7 @@ def download_model(self, model_name): self._download_gdrive_file(model_item['stats_file'], output_stats_path) # set the scale_path.npy file path in the model config.json - if self._check_dict_key(model_item, 'stats_file') or os.path.exists(os.path.join(output_path, 'scale_stats.npy')): - output_stats_path = os.path.join(output_path, 'scale_stats.npy') + if self._check_dict_key(model_item, 'stats_file') or os.path.exists(output_stats_path): # set scale stats path in config.json config_path = output_config_path config = load_config(config_path)