mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-06-14 13:57:30 +02:00
Remove idle CPU unloading (when GPUs are active), because now a CPU can never be used along with GPUs
This commit is contained in:
parent
ea03fd22db
commit
5f880a179c
@ -280,12 +280,6 @@ def thread_render(device):
|
|||||||
return
|
return
|
||||||
task = thread_get_next_task()
|
task = thread_get_next_task()
|
||||||
if task is None:
|
if task is None:
|
||||||
if runtime.thread_data.device == 'cpu' and is_alive() > 1 and hasattr(runtime.thread_data, 'lastActive') and time.time() - runtime.thread_data.lastActive > CPU_UNLOAD_TIMEOUT:
|
|
||||||
# GPUs present and CPU is idle. Unload resources.
|
|
||||||
runtime.unload_models()
|
|
||||||
runtime.unload_filters()
|
|
||||||
del runtime.thread_data.lastActive
|
|
||||||
print('unloaded models from CPU because it was idle for too long')
|
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
continue
|
continue
|
||||||
if task.error is not None:
|
if task.error is not None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user