Skip to content

Commit 586fb41

Browse files
committed
ImageRemoveAlphaNode
1 parent 744fe8c commit 586fb41

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

nodes/image_utility.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1012,12 +1012,14 @@ def node_function(self, images, masks, fill_color):
10121012
out_images = []
10131013
for image, mask in zip(images, masks):
10141014
pil = tensor_to_pil(image)
1015-
pil_mask = tensor_to_pil_single(mask)
1015+
pil_mask = tensor_to_pil_single(1 - mask)
10161016

10171017
new_pil = Image.new("RGBA", pil.size, fill_color)
10181018
new_pil.paste(pil, pil_mask)
1019+
new_pil = new_pil.convert("RGB")
10191020

10201021
image = pil_to_tensor(new_pil)
10211022
out_images.append(image)
1023+
10221024
out_images = torch.stack(out_images, dim=0)
10231025
return (out_images,)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Python Script
6363
6464
Load LoRA Dual
6565
"""
66-
version = "1.0.78"
66+
version = "1.0.79"
6767
license = { file = "LICENSE" }
6868
dependencies = [
6969
"googletrans",

0 commit comments

Comments
 (0)