From f1424187077eceafbe5a49f1f80dfdb75726aa05 Mon Sep 17 00:00:00 2001 From: Sean Sube Date: Sun, 15 Jan 2023 13:45:37 -0600 Subject: [PATCH] fix(api): convert mask before blending source --- api/onnx_web/image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/onnx_web/image.py b/api/onnx_web/image.py index 2cb1d7cea..0e378a072 100644 --- a/api/onnx_web/image.py +++ b/api/onnx_web/image.py @@ -148,6 +148,6 @@ def expand_image( full_mask = mask_filter(mask_image, dims, origin) full_noise = noise_source(source_image, dims, origin) - full_source = Image.composite(full_source, full_noise, full_mask) + full_source = Image.composite(full_source, full_noise, full_mask.convert('L')) return (full_source, full_mask, full_noise, (full_width, full_height))