mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
(minor) The latest ruff version has _slightly_ different formatting preferences.
This commit is contained in:
parent
a78df8123f
commit
9d9d1761f3
@ -28,9 +28,9 @@ class RectangleMaskInvocation(BaseInvocation, WithMetadata):
|
|||||||
|
|
||||||
def invoke(self, context: InvocationContext) -> MaskOutput:
|
def invoke(self, context: InvocationContext) -> MaskOutput:
|
||||||
mask = torch.zeros((1, self.height, self.width), dtype=torch.bool)
|
mask = torch.zeros((1, self.height, self.width), dtype=torch.bool)
|
||||||
mask[
|
mask[:, self.y_top : self.y_top + self.rectangle_height, self.x_left : self.x_left + self.rectangle_width] = (
|
||||||
:, self.y_top : self.y_top + self.rectangle_height, self.x_left : self.x_left + self.rectangle_width
|
True
|
||||||
] = True
|
)
|
||||||
|
|
||||||
mask_name = context.tensors.save(mask)
|
mask_name = context.tensors.save(mask)
|
||||||
return MaskOutput(
|
return MaskOutput(
|
||||||
|
Loading…
Reference in New Issue
Block a user