From dc27edb8d9cc4942089fe69e66b775ad3bd1e298 Mon Sep 17 00:00:00 2001 From: dnl13 Date: Mon, 23 Oct 2023 15:30:48 +0200 Subject: [PATCH] fixed expected MASK output behaviour for GroundingDinoSAMSegment Node --- node.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node.py b/node.py index 94e5f36..beb88a7 100644 --- a/node.py +++ b/node.py @@ -202,7 +202,7 @@ def split_image_mask(image): image_rgb = torch.from_numpy(image_rgb)[None,] if 'A' in image.getbands(): mask = np.array(image.getchannel('A')).astype(np.float32) / 255.0 - mask = 1. - torch.from_numpy(mask) + mask = torch.from_numpy(mask)[None,] else: mask = torch.zeros((64, 64), dtype=torch.float32, device="cpu") return (image_rgb, mask)