mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Merge branch 'ip-adapter-style-comp' of https://github.com/blessedcoolant/InvokeAI into ip-adapter-style-comp
This commit is contained in:
commit
145a0b029e
@ -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(
|
||||||
|
@ -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):
|
||||||
|
Loading…
Reference in New Issue
Block a user