From cd32f26b167088d6b489e43b260c187ea5e4d223 Mon Sep 17 00:00:00 2001 From: Scott Nealon Date: Tue, 30 Jan 2024 19:32:03 -0500 Subject: [PATCH] =?UTF-8?q?fix:=20=E2=9C=A8=20optional=20inputs=20of=20col?= =?UTF-8?q?ored=20image?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: Re-enable ColoredImage generation when foreground_image is not provided. * fix: convert new image to RGB --- nodes/image_processing.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nodes/image_processing.py b/nodes/image_processing.py index 1dd2945..02ce08c 100644 --- a/nodes/image_processing.py +++ b/nodes/image_processing.py @@ -541,8 +541,10 @@ class ColoredImage: Image.alpha_composite(image, fg_image).convert("RGB") ) - elif foreground_mask is not None: - log.warn("Mask ignored because no foreground image is given") + else: + if foreground_mask is not None: + log.warn("Mask ignored because no foreground image is given") + output.append(image.convert("RGB")) output = pil2tensor(output)