From c35def11076a162a97afa52fc37639b0bfed7068 Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Wed, 1 Apr 2026 18:02:40 +0300 Subject: [PATCH] cleanup --- comfy/ldm/supir/supir_modules.py | 2 +- comfy/ldm/supir/supir_patch.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/comfy/ldm/supir/supir_modules.py b/comfy/ldm/supir/supir_modules.py index 8fee6ac93..7389b01d2 100644 --- a/comfy/ldm/supir/supir_modules.py +++ b/comfy/ldm/supir/supir_modules.py @@ -33,7 +33,7 @@ class ZeroSFT(nn.Module): else: h_raw = h - h = h.add_(self.zero_conv(c)) + h = h + self.zero_conv(c) if h_ori is not None and self.pre_concat: h = torch.cat([h_ori, h], dim=1) actv = self.mlp_shared(c) diff --git a/comfy/ldm/supir/supir_patch.py b/comfy/ldm/supir/supir_patch.py index 8c210971a..d1f17d982 100644 --- a/comfy/ldm/supir/supir_patch.py +++ b/comfy/ldm/supir/supir_patch.py @@ -1,5 +1,4 @@ import torch -import comfy.model_management from comfy.ldm.modules.diffusionmodules.openaimodel import Upsample @@ -29,7 +28,6 @@ class SUPIRPatch: return x = kwargs["x"] batch_size = x.shape[0] - comfy.model_management.load_models_gpu([self.model_patch]) hint = self.hint_latent.to(device=x.device, dtype=x.dtype) if hint.shape[0] < batch_size: hint = hint.repeat(batch_size // hint.shape[0], 1, 1, 1)[:batch_size]