From e674b995d0c75d1783d05d9c8080f02848f9d204 Mon Sep 17 00:00:00 2001 From: Jedrzej Kosinski Date: Fri, 22 Dec 2023 03:20:19 -0600 Subject: [PATCH] Change latent upscaling to nearest-exact for now - will come up with a better solution after getting sleep --- control/control.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/control/control.py b/control/control.py index d211751..c5812ed 100644 --- a/control/control.py +++ b/control/control.py @@ -274,7 +274,7 @@ class SparseCtrlAdvanced(ControlNetAdvanced): if self.control_model.use_simplified_conditioning_embedding: # RGB SparseCtrl; the inputs are latents - use bilinear to avoid blocky artifacts sub_cond_hint = self.latent_format.process_in(sub_cond_hint) # multiplies by model scale factor - sub_cond_hint = comfy.utils.common_upscale(sub_cond_hint, x_noisy.shape[3], x_noisy.shape[2], "bilinear", "center").to(dtype).to(self.device) + sub_cond_hint = comfy.utils.common_upscale(sub_cond_hint, x_noisy.shape[3], x_noisy.shape[2], "nearest-exact", "center").to(dtype).to(self.device) else: # other SparseCtrl; inputs are typical images sub_cond_hint = comfy.utils.common_upscale(sub_cond_hint, x_noisy.shape[3] * 8, x_noisy.shape[2] * 8, 'nearest-exact', "center").to(dtype).to(self.device)