From 8cf9bd47b2eeeb986a0aa6d6af03aa9fad4eef68 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 17 Aug 2023 11:59:47 +1000 Subject: [PATCH] chore(backend): remove unnecessary batch validation function The `Batch` model is fully validated by pydantic on instantiation; we do not need any validation logic for it. --- invokeai/app/services/batch_manager.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/invokeai/app/services/batch_manager.py b/invokeai/app/services/batch_manager.py index 3b7a0b2b49..956d5ff610 100644 --- a/invokeai/app/services/batch_manager.py +++ b/invokeai/app/services/batch_manager.py @@ -112,18 +112,11 @@ class BatchManager(BatchManagerBase): ges = self.__invoker.services.graph_execution_manager.get(created_session.session_id) self.__invoker.invoke(ges, invoke_all=True) - def _valid_batch_config(self, batch_process: BatchProcess) -> bool: - # TODO: Check that the node_ids in the batch are unique - # TODO: Validate data types are correct for each batch data - return True - def create_batch_process(self, batch: Batch, graph: Graph) -> BatchProcessResponse: batch_process = BatchProcess( batch=batch, graph=graph, ) - if not self._valid_batch_config(batch_process): - return None batch_process = self.__batch_process_storage.save(batch_process) sessions = self._create_sessions(batch_process) return BatchProcessResponse(