From e8941587e5d3443daaf4766c40050f283469933b Mon Sep 17 00:00:00 2001 From: Sharrnah <55756126+Sharrnah@users.noreply.github.com> Date: Tue, 24 Dec 2024 22:13:41 +0100 Subject: [PATCH] [BUGFIX] Error if invalid F5/E5 model is requested --- Models/TTS/f5_tts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Models/TTS/f5_tts.py b/Models/TTS/f5_tts.py index 11d2434..4434572 100644 --- a/Models/TTS/f5_tts.py +++ b/Models/TTS/f5_tts.py @@ -258,7 +258,7 @@ def load(self): # remove language part from string example: " (en & zh)" model = re.sub(r'\(.*?\)', '', model).strip() - if model == "": + if model == "" or model not in TTS_MODEL_LINKS: model = "F5-TTS" self.download_model("vocab")