Fix issue with controlnet workaround

This commit is contained in:
blepping
2024-08-17 01:34:02 -06:00
parent 64090c80b7
commit d4d3fd0ff3
+2 -3
View File
@@ -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