Skip to content

Commit

Permalink
fix(api): if there are only 2 model urls, assume they are model and c…
Browse files Browse the repository at this point in the history
…onfig
  • Loading branch information
eginhard committed Mar 10, 2025
1 parent 8b75a78 commit 71faeaf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion TTS/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ def download_model_by_name(
self, model_name: str, vocoder_name: str | None = None
) -> tuple[Path | None, Path | None, Path | None, Path | None, Path | None]:
model_path, config_path, model_item = self.manager.download_model(model_name)
if "fairseq" in model_name or (model_item is not None and isinstance(model_item["model_url"], list)):
if "fairseq" in model_name or (
model_item is not None and isinstance(model_item["model_url"], list) and len(model_item["model_url"]) > 2
):
# return model directory if there are multiple files
# we assume that the model knows how to load itself
return None, None, None, None, model_path
Expand Down

0 comments on commit 71faeaf

Please sign in to comment.