fix: ✨ optional inputs of colored image

* fix: Re-enable ColoredImage generation when foreground_image is not provided.
* fix: convert new image to RGB
This commit is contained in:
Scott Nealon
2024-01-31 01:32:03 +01:00
committed by GitHub
parent 501c330105
commit cd32f26b16
+4 -2
View File
@@ -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)