diff --git a/invokeai/app/invocations/baseinvocation.py b/invokeai/app/invocations/baseinvocation.py index 1ba498c9d8..5f75cfd3b8 100644 --- a/invokeai/app/invocations/baseinvocation.py +++ b/invokeai/app/invocations/baseinvocation.py @@ -39,12 +39,6 @@ class BaseInvocationOutput(BaseModel): return tuple(subclasses) -class InvocationMeta(BaseModel): - is_intermediate: bool = Field( - default=False, - description="Whether this is an intermediate node. Intermediate nodes are periodically deleted." - ) - class BaseInvocation(ABC, BaseModel): """A node to process inputs and produce outputs. May use dependency injection in __init__ to receive providers. @@ -84,8 +78,7 @@ class BaseInvocation(ABC, BaseModel): #fmt: off id: str = Field(description="The id of this node. Must be unique among all nodes.") - type: str = Field(description="The type of this node. Must be unique among all nodes.") - meta: InvocationMeta = Field(default=InvocationMeta(), description="The meta properties of this node.") + is_intermediate: bool = Field(default=False, description="Whether or not this node is an intermediate node.") #fmt: on diff --git a/invokeai/app/invocations/cv.py b/invokeai/app/invocations/cv.py index f24a83a795..5e9fe088b5 100644 --- a/invokeai/app/invocations/cv.py +++ b/invokeai/app/invocations/cv.py @@ -61,7 +61,7 @@ class CvInpaintInvocation(BaseInvocation, CvInvocationConfig): image_category=ImageCategory.GENERAL, node_id=self.id, session_id=context.graph_execution_state_id, - is_intermediate=self.meta.is_intermediate, + is_intermediate=self.is_intermediate, ) return ImageOutput( diff --git a/invokeai/app/invocations/generate.py b/invokeai/app/invocations/generate.py index 2fa2a15faa..44280c3b41 100644 --- a/invokeai/app/invocations/generate.py +++ b/invokeai/app/invocations/generate.py @@ -101,7 +101,7 @@ class TextToImageInvocation(BaseInvocation, SDImageInvocation): image_category=ImageCategory.GENERAL, session_id=context.graph_execution_state_id, node_id=self.id, - is_intermediate=self.meta.is_intermediate, + is_intermediate=self.is_intermediate, ) return ImageOutput( @@ -182,7 +182,7 @@ class ImageToImageInvocation(TextToImageInvocation): image_category=ImageCategory.GENERAL, session_id=context.graph_execution_state_id, node_id=self.id, - is_intermediate=self.meta.is_intermediate, + is_intermediate=self.is_intermediate, ) return ImageOutput( @@ -298,7 +298,7 @@ class InpaintInvocation(ImageToImageInvocation): image_category=ImageCategory.GENERAL, session_id=context.graph_execution_state_id, node_id=self.id, - is_intermediate=self.meta.is_intermediate, + is_intermediate=self.is_intermediate, ) return ImageOutput( diff --git a/invokeai/app/invocations/image.py b/invokeai/app/invocations/image.py index c561eb100f..69d51e6158 100644 --- a/invokeai/app/invocations/image.py +++ b/invokeai/app/invocations/image.py @@ -143,7 +143,7 @@ class ImageCropInvocation(BaseInvocation, PILInvocationConfig): image_category=ImageCategory.GENERAL, node_id=self.id, session_id=context.graph_execution_state_id, - is_intermediate=self.meta.is_intermediate, + is_intermediate=self.is_intermediate, ) return ImageOutput( @@ -205,7 +205,7 @@ class ImagePasteInvocation(BaseInvocation, PILInvocationConfig): image_category=ImageCategory.GENERAL, node_id=self.id, session_id=context.graph_execution_state_id, - is_intermediate=self.meta.is_intermediate, + is_intermediate=self.is_intermediate, ) return ImageOutput( @@ -244,7 +244,7 @@ class MaskFromAlphaInvocation(BaseInvocation, PILInvocationConfig): image_category=ImageCategory.MASK, node_id=self.id, session_id=context.graph_execution_state_id, - is_intermediate=self.meta.is_intermediate, + is_intermediate=self.is_intermediate, ) return MaskOutput( @@ -283,7 +283,7 @@ class ImageMultiplyInvocation(BaseInvocation, PILInvocationConfig): image_category=ImageCategory.GENERAL, node_id=self.id, session_id=context.graph_execution_state_id, - is_intermediate=self.meta.is_intermediate, + is_intermediate=self.is_intermediate, ) return ImageOutput( @@ -322,7 +322,7 @@ class ImageChannelInvocation(BaseInvocation, PILInvocationConfig): image_category=ImageCategory.GENERAL, node_id=self.id, session_id=context.graph_execution_state_id, - is_intermediate=self.meta.is_intermediate, + is_intermediate=self.is_intermediate, ) return ImageOutput( @@ -361,7 +361,7 @@ class ImageConvertInvocation(BaseInvocation, PILInvocationConfig): image_category=ImageCategory.GENERAL, node_id=self.id, session_id=context.graph_execution_state_id, - is_intermediate=self.meta.is_intermediate, + is_intermediate=self.is_intermediate, ) return ImageOutput( @@ -403,7 +403,7 @@ class ImageBlurInvocation(BaseInvocation, PILInvocationConfig): image_category=ImageCategory.GENERAL, node_id=self.id, session_id=context.graph_execution_state_id, - is_intermediate=self.meta.is_intermediate, + is_intermediate=self.is_intermediate, ) return ImageOutput( @@ -444,7 +444,7 @@ class ImageLerpInvocation(BaseInvocation, PILInvocationConfig): image_category=ImageCategory.GENERAL, node_id=self.id, session_id=context.graph_execution_state_id, - is_intermediate=self.meta.is_intermediate, + is_intermediate=self.is_intermediate, ) return ImageOutput( @@ -490,7 +490,7 @@ class ImageInverseLerpInvocation(BaseInvocation, PILInvocationConfig): image_category=ImageCategory.GENERAL, node_id=self.id, session_id=context.graph_execution_state_id, - is_intermediate=self.meta.is_intermediate, + is_intermediate=self.is_intermediate, ) return ImageOutput( diff --git a/invokeai/app/invocations/infill.py b/invokeai/app/invocations/infill.py index 313edec201..ad60b62633 100644 --- a/invokeai/app/invocations/infill.py +++ b/invokeai/app/invocations/infill.py @@ -149,7 +149,7 @@ class InfillColorInvocation(BaseInvocation): image_category=ImageCategory.GENERAL, node_id=self.id, session_id=context.graph_execution_state_id, - is_intermediate=self.meta.is_intermediate, + is_intermediate=self.is_intermediate, ) return ImageOutput( @@ -194,7 +194,7 @@ class InfillTileInvocation(BaseInvocation): image_category=ImageCategory.GENERAL, node_id=self.id, session_id=context.graph_execution_state_id, - is_intermediate=self.meta.is_intermediate, + is_intermediate=self.is_intermediate, ) return ImageOutput( @@ -232,7 +232,7 @@ class InfillPatchMatchInvocation(BaseInvocation): image_category=ImageCategory.GENERAL, node_id=self.id, session_id=context.graph_execution_state_id, - is_intermediate=self.meta.is_intermediate, + is_intermediate=self.is_intermediate, ) return ImageOutput( diff --git a/invokeai/app/invocations/latent.py b/invokeai/app/invocations/latent.py index 9f78d72b77..11ea7134bb 100644 --- a/invokeai/app/invocations/latent.py +++ b/invokeai/app/invocations/latent.py @@ -370,7 +370,7 @@ class LatentsToImageInvocation(BaseInvocation): image_category=ImageCategory.GENERAL, session_id=context.graph_execution_state_id, node_id=self.id, - is_intermediate=self.meta.is_intermediate + is_intermediate=self.is_intermediate ) return ImageOutput( diff --git a/invokeai/app/invocations/reconstruct.py b/invokeai/app/invocations/reconstruct.py index 0fa83df941..db71e4201d 100644 --- a/invokeai/app/invocations/reconstruct.py +++ b/invokeai/app/invocations/reconstruct.py @@ -47,7 +47,7 @@ class RestoreFaceInvocation(BaseInvocation): image_category=ImageCategory.GENERAL, node_id=self.id, session_id=context.graph_execution_state_id, - is_intermediate=self.meta.is_intermediate, + is_intermediate=self.is_intermediate, ) return ImageOutput( diff --git a/invokeai/app/invocations/upscale.py b/invokeai/app/invocations/upscale.py index 07b574e02e..90c9e4bf4f 100644 --- a/invokeai/app/invocations/upscale.py +++ b/invokeai/app/invocations/upscale.py @@ -49,7 +49,7 @@ class UpscaleInvocation(BaseInvocation): image_category=ImageCategory.GENERAL, node_id=self.id, session_id=context.graph_execution_state_id, - is_intermediate=self.meta.is_intermediate, + is_intermediate=self.is_intermediate, ) return ImageOutput(