From 99e03fe92e110c8cae173e4f86f2a0060d30cb23 Mon Sep 17 00:00:00 2001 From: Brandon Rising Date: Fri, 18 Aug 2023 13:33:09 -0400 Subject: [PATCH] Run unmodified graph if no batch data is provided --- invokeai/app/services/batch_manager.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/invokeai/app/services/batch_manager.py b/invokeai/app/services/batch_manager.py index 426834b6dd..a2f8c30c42 100644 --- a/invokeai/app/services/batch_manager.py +++ b/invokeai/app/services/batch_manager.py @@ -137,6 +137,11 @@ class BatchManager(BatchManagerBase): self.__invoker.services.graph_execution_manager.set(ges) batch_session = BatchSession(batch_id=batch_process.batch_id, session_id=ges.id, state="created") sessions.append(self.__batch_process_storage.create_session(batch_session)) + if not sessions: + ges = GraphExecutionState(graph=batch_process.graph) + self.__invoker.services.graph_execution_manager.set(ges) + batch_session = BatchSession(batch_id=batch_process.batch_id, session_id=ges.id, state="created") + sessions.append(self.__batch_process_storage.create_session(batch_session)) return sessions def cancel_batch_process(self, batch_process_id: str) -> None: