Merge branch 'ip-adapter-style-comp' of https://github.com/blessedcoolant/InvokeAI into ip-adapter-style-comp

This commit is contained in:
blessedcoolant 2024-04-13 12:13:06 +05:30
commit 145a0b029e
2 changed files with 5 additions and 4 deletions

View File

@ -24,9 +24,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[:, self.y_top : self.y_top + self.rectangle_height, self.x_left : self.x_left + self.rectangle_width] = ( mask[
True :, 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) mask_tensor_name = context.tensors.save(mask)
return MaskOutput( return MaskOutput(

View File

@ -17,7 +17,8 @@ class MigrateCallback(Protocol):
See :class:`Migration` for an example. See :class:`Migration` for an example.
""" """
def __call__(self, cursor: sqlite3.Cursor) -> None: ... def __call__(self, cursor: sqlite3.Cursor) -> None:
...
class MigrationError(RuntimeError): class MigrationError(RuntimeError):