mirror of
https://git.datalinker.icu/kijai/ComfyUI-KJNodes.git
synced 2026-05-22 11:29:09 +08:00
invert mask
This commit is contained in:
parent
1bfdb8a1a2
commit
bbf3db8760
@ -1778,6 +1778,8 @@ class LoadAndResizeImage:
|
|||||||
mask = torch.from_numpy(mask)
|
mask = torch.from_numpy(mask)
|
||||||
if c == 'A' and bg_color_rgba:
|
if c == 'A' and bg_color_rgba:
|
||||||
mask = alpha_mask
|
mask = alpha_mask
|
||||||
|
elif c == 'A':
|
||||||
|
mask = 1. - mask
|
||||||
else:
|
else:
|
||||||
mask = torch.zeros((64, 64), dtype=torch.float32, device="cpu")
|
mask = torch.zeros((64, 64), dtype=torch.float32, device="cpu")
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user