mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-15 09:33:44 -07:00
Long startup time on Linux (#356)
This commit is contained in:
parent
e7562054d0
commit
a33ef50da5
1 changed files with 8 additions and 4 deletions
|
@ -12,7 +12,7 @@ import cv2
|
||||||
import models
|
import models
|
||||||
from interact import interact as io
|
from interact import interact as io
|
||||||
|
|
||||||
def trainerThread (s2c, c2s, args, device_args):
|
def trainerThread (s2c, c2s, e, args, device_args):
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
start_time = time.time()
|
start_time = time.time()
|
||||||
|
@ -66,6 +66,7 @@ def trainerThread (s2c, c2s, args, device_args):
|
||||||
else:
|
else:
|
||||||
previews = [( 'debug, press update for new', model.debug_one_iter())]
|
previews = [( 'debug, press update for new', model.debug_one_iter())]
|
||||||
c2s.put ( {'op':'show', 'previews': previews} )
|
c2s.put ( {'op':'show', 'previews': previews} )
|
||||||
|
e.set() #Set the GUI Thread as Ready
|
||||||
|
|
||||||
|
|
||||||
if model.is_first_run():
|
if model.is_first_run():
|
||||||
|
@ -189,9 +190,12 @@ def main(args, device_args):
|
||||||
s2c = queue.Queue()
|
s2c = queue.Queue()
|
||||||
c2s = queue.Queue()
|
c2s = queue.Queue()
|
||||||
|
|
||||||
thread = threading.Thread(target=trainerThread, args=(s2c, c2s, args, device_args) )
|
e = threading.Event()
|
||||||
|
thread = threading.Thread(target=trainerThread, args=(s2c, c2s, e, args, device_args) )
|
||||||
thread.start()
|
thread.start()
|
||||||
|
|
||||||
|
e.wait() #Wait for inital load to occur.
|
||||||
|
|
||||||
if no_preview:
|
if no_preview:
|
||||||
while True:
|
while True:
|
||||||
if not c2s.empty():
|
if not c2s.empty():
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue