Update nodes.py

This commit is contained in:
kijai 2024-04-03 02:12:07 +03:00
parent 776bf61380
commit 883f2f48e1

View File

@ -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, :, :]