Update api.py

list_models should return list of models, not model manager
This commit is contained in:
hadariru 2024-03-07 16:25:09 +09:00 committed by GitHub
parent dbf1a08a0d
commit cb5b404571
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -123,7 +123,7 @@ class TTS(nn.Module):
return Path(__file__).parent / ".models.json"
def list_models(self):
return ModelManager(models_file=TTS.get_models_file_path(), progress_bar=False, verbose=False)
return ModelManager(models_file=TTS.get_models_file_path(), progress_bar=False, verbose=False).list_models()
def download_model_by_name(self, model_name: str):
model_path, config_path, model_item = self.manager.download_model(model_name)