mirror of
https://git.datalinker.icu/kijai/ComfyUI-KJNodes.git
synced 2026-01-23 18:24:29 +08:00
Update nodes.py
This commit is contained in:
parent
776bf61380
commit
883f2f48e1
5
nodes.py
5
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, :, :]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user