kijai / ComfyUI-KJNodes

Various custom nodes for ComfyUI
GNU General Public License v3.0
626 stars 75 forks source link

[bug]The new squeeze does not make sense #44

Closed YacratesWyh closed 6 months ago

YacratesWyh commented 7 months ago

At nodes.py line 2420

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)

change to

Resize the mask

        resized_tensor = F.interpolate(tensor.unsqueeze(0), size=(height, width), mode='bilinear', align_corners=False)

The unsqueeze would leave one 0, making vhs load images unable to process in your batchseg. Or if you may give an example json of how your workflow goes.

kijai commented 7 months ago

Looks like I managed to mix up commits or something, I had redone most of that node, but it was never pushed. Should work now, tried single images and batches.