From d4d3fd0ff3213db4666b1ddda7ebbd2ab828fadf Mon Sep 17 00:00:00 2001 From: blepping Date: Sat, 17 Aug 2024 01:34:02 -0600 Subject: [PATCH] Fix issue with controlnet workaround --- py/raunet.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/py/raunet.py b/py/raunet.py index 3443f02..b693e2d 100644 --- a/py/raunet.py +++ b/py/raunet.py @@ -61,9 +61,8 @@ class HDState: self.orig_apply_control = openaimodel.apply_control self.orig_fua_apply_control = None - @classmethod def hd_apply_control( - cls, + self, h: torch.Tensor, control: None | dict, name: str, @@ -78,7 +77,7 @@ class HDState: logging.info( f"* jankhidiffusion: Scaling controlnet conditioning: {ctrl.shape[-2:]} -> {h.shape[-2:]}", ) - ctrl = F.interpolate(ctrl, size=h.shape[-2:], **cls.controlnet_scale_args) + ctrl = F.interpolate(ctrl, size=h.shape[-2:], **self.controlnet_scale_args) h += ctrl return h