diff --git a/invokeai/app/invocations/mask.py b/invokeai/app/invocations/mask.py index e892a766c1..fc5ff2bde6 100644 --- a/invokeai/app/invocations/mask.py +++ b/invokeai/app/invocations/mask.py @@ -28,9 +28,9 @@ class RectangleMaskInvocation(BaseInvocation, WithMetadata): def invoke(self, context: InvocationContext) -> MaskOutput: mask = torch.zeros((1, self.height, self.width), dtype=torch.bool) - mask[ - :, self.y_top : self.y_top + self.rectangle_height, self.x_left : self.x_left + self.rectangle_width - ] = True + mask[:, self.y_top : self.y_top + self.rectangle_height, self.x_left : self.x_left + self.rectangle_width] = ( + True + ) mask_name = context.tensors.save(mask) return MaskOutput(