forked from mrq/ai-voice-cloning
oops
This commit is contained in:
parent
baa6b76b85
commit
2f5486a8d5
11
src/utils.py
11
src/utils.py
|
@ -3475,9 +3475,12 @@ def update_autoregressive_model(autoregressive_model_path):
|
||||||
if args.tts_backend != "tortoise":
|
if args.tts_backend != "tortoise":
|
||||||
raise f"Unsupported backend: {args.tts_backend}"
|
raise f"Unsupported backend: {args.tts_backend}"
|
||||||
|
|
||||||
match = re.findall(r'^\[[a-fA-F0-9]{8}\] (.+?)$', autoregressive_model_path)
|
if autoregressive_model_path == "auto":
|
||||||
if match:
|
autoregressive_model_path = deduce_autoregressive_model()
|
||||||
autoregressive_model_path = match[0]
|
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):
|
if not autoregressive_model_path or not os.path.exists(autoregressive_model_path):
|
||||||
print(f"Invalid model: {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:
|
if hasattr(tts, "loading") and tts.loading:
|
||||||
raise Exception("TTS is still initializing...")
|
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:
|
if autoregressive_model_path == tts.autoregressive_model_path:
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue
Block a user