Enable preload on cpu when no other devices are alive.

This commit is contained in:
Marc-Andre Ferland 2022-10-27 21:57:50 -04:00
parent 7dc7ba9977
commit 22a11769fa

View File

@ -250,7 +250,7 @@ def thread_render(device):
weak_thread_data[threading.current_thread()] = {
'device': runtime.thread_data.device
}
if runtime.thread_data.device != 'cpu':
if runtime.thread_data.device != 'cpu' or is_alive() == 1:
preload_model()
current_state = ServerStates.Online
while True: