This commit is contained in:
Lincoln Stein
2024-05-29 19:46:46 -04:00
committed by Kent Keirsey
parent 493f81788c
commit 93c9852142
3 changed files with 5 additions and 7 deletions

View File

@ -25,9 +25,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_tensor_name = context.tensors.save(mask)
return MaskOutput(