From 883f2f48e12623ba8044bf425b46e9aebd14474c Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Wed, 3 Apr 2024 02:12:07 +0300 Subject: [PATCH] Update nodes.py --- nodes.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/nodes.py b/nodes.py index 6d1bc22..c7644bb 100644 --- a/nodes.py +++ b/nodes.py @@ -2250,11 +2250,8 @@ class BatchCLIPSeg: tensor = tensor_normalized - # Add extra dimensions to the mask for batch and channel - tensor = tensor[None, None, :, :] - # Resize the mask - resized_tensor = F.interpolate(tensor, size=(height, width), mode='bilinear', align_corners=False) + resized_tensor = F.interpolate(tensor.unsqueeze(0), size=(height, width), mode='bilinear', align_corners=False) # Remove the extra dimensions resized_tensor = resized_tensor[0, 0, :, :]