Skip to content

Commit cec7399

Browse files
committed
(minor) Use a new variable name to satisfy type checks.
1 parent bdae81e commit cec7399

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

invokeai/app/invocations/grounded_sam.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,8 @@ def _to_numpy_masks(self, masks: torch.Tensor) -> list[npt.NDArray[np.uint8]]:
154154
masks = masks.permute(0, 2, 3, 1)
155155
masks = masks.mean(dim=-1)
156156
masks = (masks > 0).int()
157-
masks = masks.numpy().astype(np.uint8)
158-
masks = list(masks)
159-
return masks
157+
np_masks = masks.numpy().astype(np.uint8)
158+
return list(np_masks)
160159

161160
def _apply_polygon_refinement(self, masks: list[npt.NDArray[np.uint8]]) -> list[npt.NDArray[np.uint8]]:
162161
"""Apply polygon refinement to the masks.

0 commit comments

Comments
 (0)