Fix it needs to be converted to 3 channels when after adding the background on easy imageRembg

This commit is contained in:
yolain
2024-12-27 20:46:16 +08:00
parent 4f283c3b55
commit 2c2751a762
+1 -2
View File
@@ -916,11 +916,10 @@ class imageRemBg:
if add_background != 'none':
_layer = tensor2pil(new_images)
_canvas = Image.new('RGBA', _layer.size, (255,255,255,255) if add_background == 'white' else (0, 0, 0, 255))
_canvas = Image.new('RGB', _layer.size, (255,255,255) if add_background == 'white' else (0, 0, 0))
_canvas.paste(_layer, mask=_layer)
new_images = pil2tensor(_canvas)
results = easySave(new_images, save_prefix, image_output, prompt, extra_pnginfo)
if image_output in ("Hide", "Hide/Save"):