diff --git a/invokeai/app/api/routers/session_queue.py b/invokeai/app/api/routers/session_queue.py index f7d29a88c5..409f13cc28 100644 --- a/invokeai/app/api/routers/session_queue.py +++ b/invokeai/app/api/routers/session_queue.py @@ -15,7 +15,6 @@ from invokeai.app.services.session_queue.session_queue_common import ( ClearResult, EnqueueBatchResult, PruneResult, - QueueItemOrigin, SessionQueueItem, SessionQueueItemDTO, SessionQueueStatus, @@ -114,7 +113,7 @@ async def cancel_by_batch_ids( ) async def cancel_by_origin( queue_id: str = Path(description="The queue id to perform this operation on"), - origin: QueueItemOrigin = Query(description="The origin to cancel all queue items for"), + origin: str = Query(description="The origin to cancel all queue items for"), ) -> CancelByOriginResult: """Immediately cancels all queue items with the given origin""" return ApiDependencies.invoker.services.session_queue.cancel_by_origin(queue_id=queue_id, origin=origin) diff --git a/invokeai/app/invocations/image.py b/invokeai/app/invocations/image.py index fc446f860f..3ddd3a3051 100644 --- a/invokeai/app/invocations/image.py +++ b/invokeai/app/invocations/image.py @@ -1027,6 +1027,7 @@ class CanvasV2MaskAndCropOutput(ImageOutput): tags=["image", "mask", "id"], category="image", version="1.0.0", + classification=Classification.Prototype, ) class CanvasV2MaskAndCropInvocation(BaseInvocation, WithMetadata, WithBoard): """Handles Canvas V2 image output masking and cropping""" diff --git a/invokeai/app/services/session_queue/session_queue_base.py b/invokeai/app/services/session_queue/session_queue_base.py index 9658117048..93bd66e177 100644 --- a/invokeai/app/services/session_queue/session_queue_base.py +++ b/invokeai/app/services/session_queue/session_queue_base.py @@ -13,7 +13,6 @@ from invokeai.app.services.session_queue.session_queue_common import ( IsEmptyResult, IsFullResult, PruneResult, - QueueItemOrigin, SessionQueueItem, SessionQueueItemDTO, SessionQueueStatus, @@ -98,7 +97,7 @@ class SessionQueueBase(ABC): pass @abstractmethod - def cancel_by_origin(self, queue_id: str, origin: QueueItemOrigin) -> CancelByOriginResult: + def cancel_by_origin(self, queue_id: str, origin: str) -> CancelByOriginResult: """Cancels all queue items with the given batch origin""" pass diff --git a/invokeai/app/services/session_queue/session_queue_common.py b/invokeai/app/services/session_queue/session_queue_common.py index a87684cbed..1a546dab9c 100644 --- a/invokeai/app/services/session_queue/session_queue_common.py +++ b/invokeai/app/services/session_queue/session_queue_common.py @@ -1,6 +1,5 @@ import datetime import json -from enum import Enum from itertools import chain, product from typing import Generator, Iterable, Literal, NamedTuple, Optional, TypeAlias, Union, cast @@ -22,7 +21,6 @@ from invokeai.app.services.workflow_records.workflow_records_common import ( WorkflowWithoutID, WorkflowWithoutIDValidator, ) -from invokeai.app.util.metaenum import MetaEnum from invokeai.app.util.misc import uuid_string # region Errors @@ -60,13 +58,6 @@ BatchDataType = Union[ ] -class QueueItemOrigin(str, Enum, metaclass=MetaEnum): - """The origin of a batch. For example, a batch can be created from the canvas or workflows tab.""" - - CANVAS = "canvas" - WORKFLOWS = "workflows" - - class NodeFieldValue(BaseModel): node_path: str = Field(description="The node into which this batch data item will be substituted.") field_name: str = Field(description="The field into which this batch data item will be substituted.") diff --git a/invokeai/app/services/session_queue/session_queue_sqlite.py b/invokeai/app/services/session_queue/session_queue_sqlite.py index 38f8eaa422..265c6065a5 100644 --- a/invokeai/app/services/session_queue/session_queue_sqlite.py +++ b/invokeai/app/services/session_queue/session_queue_sqlite.py @@ -17,7 +17,6 @@ from invokeai.app.services.session_queue.session_queue_common import ( IsEmptyResult, IsFullResult, PruneResult, - QueueItemOrigin, SessionQueueItem, SessionQueueItemDTO, SessionQueueItemNotFoundError, @@ -427,7 +426,7 @@ class SqliteSessionQueue(SessionQueueBase): self.__lock.release() return CancelByBatchIDsResult(canceled=count) - def cancel_by_origin(self, queue_id: str, origin: QueueItemOrigin) -> CancelByOriginResult: + def cancel_by_origin(self, queue_id: str, origin: str) -> CancelByOriginResult: try: current_queue_item = self.get_current(queue_id) self.__lock.acquire()