From c6f347b81f584b6c0d44af7a209983284dbb52d2 Mon Sep 17 00:00:00 2001 From: AUTOMATIC <16777216c@gmail.com> Date: Sun, 25 Dec 2022 09:47:24 +0300 Subject: [PATCH] fix ruined SD upscale --- scripts/sd_upscale.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/sd_upscale.py b/scripts/sd_upscale.py index 28bd96b3..e8c80a6c 100644 --- a/scripts/sd_upscale.py +++ b/scripts/sd_upscale.py @@ -35,8 +35,9 @@ class Script(scripts.Script): seed = p.seed init_img = p.init_images[0] + init_img = images.flatten(init_img, opts.img2img_background_color) - if (upscaler.name != "None"): + if upscaler.name != "None": img = upscaler.scaler.upscale(init_img, scale_factor, upscaler.data_path) else: img = init_img