From 2f5486a8d55152241db9c35c8782e54865cde3b4 Mon Sep 17 00:00:00 2001 From: mrq Date: Sun, 21 May 2023 23:24:13 +0000 Subject: [PATCH] oops --- src/utils.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/utils.py b/src/utils.py index fba96f7..6c91623 100755 --- a/src/utils.py +++ b/src/utils.py @@ -3475,9 +3475,12 @@ def update_autoregressive_model(autoregressive_model_path): if args.tts_backend != "tortoise": raise f"Unsupported backend: {args.tts_backend}" - match = re.findall(r'^\[[a-fA-F0-9]{8}\] (.+?)$', autoregressive_model_path) - if match: - autoregressive_model_path = match[0] + if autoregressive_model_path == "auto": + autoregressive_model_path = deduce_autoregressive_model() + else + match = re.findall(r'^\[[a-fA-F0-9]{8}\] (.+?)$', autoregressive_model_path) + if match: + autoregressive_model_path = match[0] if not autoregressive_model_path or not os.path.exists(autoregressive_model_path): print(f"Invalid model: {autoregressive_model_path}") @@ -3496,8 +3499,6 @@ def update_autoregressive_model(autoregressive_model_path): if hasattr(tts, "loading") and tts.loading: raise Exception("TTS is still initializing...") - if autoregressive_model_path == "auto": - autoregressive_model_path = deduce_autoregressive_model() if autoregressive_model_path == tts.autoregressive_model_path: return