zhzluke96 commited on
Commit
c3d1bca
1 Parent(s): 8a3a4ec
Files changed (1) hide show
  1. modules/models.py +3 -1
modules/models.py CHANGED
@@ -7,6 +7,8 @@ from modules.devices import devices
7
  import logging
8
  import gc
9
 
 
 
10
  logger = logging.getLogger(__name__)
11
 
12
  chat_tts = None
@@ -39,7 +41,7 @@ def load_chat_tts_in_thread():
39
  def initialize_chat_tts():
40
  with lock:
41
  if chat_tts is None:
42
- model_thread = threading.Thread(target=load_chat_tts_in_thread)
43
  model_thread.start()
44
  model_thread.join()
45
 
 
7
  import logging
8
  import gc
9
 
10
+ import torch.multiprocessing as mp
11
+
12
  logger = logging.getLogger(__name__)
13
 
14
  chat_tts = None
 
41
  def initialize_chat_tts():
42
  with lock:
43
  if chat_tts is None:
44
+ model_thread = mp.Process(target=load_chat_tts_in_thread)
45
  model_thread.start()
46
  model_thread.join()
47