From 5f880a179c59468c86072cb1de7fcb22a9318b56 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Mon, 14 Nov 2022 11:24:30 +0530 Subject: [PATCH] Remove idle CPU unloading (when GPUs are active), because now a CPU can never be used along with GPUs --- ui/sd_internal/task_manager.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ui/sd_internal/task_manager.py b/ui/sd_internal/task_manager.py index c820fba9..7f2b7981 100644 --- a/ui/sd_internal/task_manager.py +++ b/ui/sd_internal/task_manager.py @@ -280,12 +280,6 @@ def thread_render(device): return task = thread_get_next_task() 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) continue if task.error is not None: