remotes/1716214724921829809/tmp_refs/heads/master
mrq 2023-05-21 23:24:13 +07:00
parent baa6b76b85
commit 2f5486a8d5
1 changed files with 6 additions and 5 deletions

@ -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