Spaces:
Runtime error
Runtime error
zhzluke96 commited on
Commit ·
d9b74ff
1
Parent(s): c3d1bca
update
Browse files6 unmodified lines7891010111227 unmodified lines404142444344454647484951505152536 unmodified linesimport loggingimport gc
import torch.multiprocessing as mp
logger = logging.getLogger(__name__)
27 unmodified linesdef initialize_chat_tts(): with lock: if chat_tts is None: model_thread = mp.Process(target=load_chat_tts_in_thread) model_thread = threading.Thread(target=load_chat_tts_in_thread) model_thread.start() model_thread.join()
def load_chat_tts(): if chat_tts is None: initialize_chat_tts() load_chat_tts_in_thread() if chat_tts is None: raise Exception("Failed to load ChatTTS models") return chat_ttsmodules/models.py+2-3