From cec739936696013a74179f8e7f53963e1d89eedd Mon Sep 17 00:00:00 2001 From: Ryan Dick Date: Wed, 31 Jul 2024 08:27:01 -0400 Subject: [PATCH] (minor) Use a new variable name to satisfy type checks. --- invokeai/app/invocations/grounded_sam.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/invokeai/app/invocations/grounded_sam.py b/invokeai/app/invocations/grounded_sam.py index 1c97cea17e..dbf6d740bc 100644 --- a/invokeai/app/invocations/grounded_sam.py +++ b/invokeai/app/invocations/grounded_sam.py @@ -154,9 +154,8 @@ class GroundedSAMInvocation(BaseInvocation): masks = masks.permute(0, 2, 3, 1) masks = masks.mean(dim=-1) masks = (masks > 0).int() - masks = masks.numpy().astype(np.uint8) - masks = list(masks) - return masks + np_masks = masks.numpy().astype(np.uint8) + return list(np_masks) def _apply_polygon_refinement(self, masks: list[npt.NDArray[np.uint8]]) -> list[npt.NDArray[np.uint8]]: """Apply polygon refinement to the masks.