From cf28617cd6f72a3e2da95ce048a12ca7690df338 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Sun, 23 Apr 2023 21:27:02 +0100 Subject: [PATCH] Event service will now sleep for 100ms between polls instead of 1ms, reducing CPU usage significantly --- invokeai/app/api/events.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invokeai/app/api/events.py b/invokeai/app/api/events.py index bcfaad35a1..41414a9230 100644 --- a/invokeai/app/api/events.py +++ b/invokeai/app/api/events.py @@ -45,7 +45,7 @@ class FastAPIEventService(EventServiceBase): ) except Empty: - await asyncio.sleep(0.001) + await asyncio.sleep(0.1) pass except asyncio.CancelledError as e: