Spaces:
Runtime error
Runtime error
zhzluke96
commited on
Commit
•
6ecb8c2
1
Parent(s):
d9b74ff
update
Browse files- modules/models.py +2 -1
modules/models.py
CHANGED
@@ -47,7 +47,8 @@ def initialize_chat_tts():
|
|
47 |
|
48 |
def load_chat_tts():
|
49 |
if chat_tts is None:
|
50 |
-
|
|
|
51 |
if chat_tts is None:
|
52 |
raise Exception("Failed to load ChatTTS models")
|
53 |
return chat_tts
|
|
|
47 |
|
48 |
def load_chat_tts():
|
49 |
if chat_tts is None:
|
50 |
+
with lock:
|
51 |
+
load_chat_tts_in_thread()
|
52 |
if chat_tts is None:
|
53 |
raise Exception("Failed to load ChatTTS models")
|
54 |
return chat_tts
|