From acd6b17476a44040fa35bc02c48d06eee86c571a Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 12 Jan 2024 20:51:47 +0100 Subject: [PATCH] Fixed upscaling with transparency (#2457) --- backend/src/nodes/impl/upscale/convenient_upscale.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/nodes/impl/upscale/convenient_upscale.py b/backend/src/nodes/impl/upscale/convenient_upscale.py index 16404649e..1f63449fa 100644 --- a/backend/src/nodes/impl/upscale/convenient_upscale.py +++ b/backend/src/nodes/impl/upscale/convenient_upscale.py @@ -25,7 +25,7 @@ def denoise_and_flatten_alpha(img: np.ndarray) -> np.ndarray: alpha_max = np.max(img, axis=2) alpha_mean = np.mean(img, axis=2) alpha = alpha_max * alpha_mean + alpha_min * (1 - alpha_mean) - return alpha + return alpha.clip(0, 1) def convenient_upscale(