Print warning when controlnet can't be applied instead of crashing.

This commit is contained in:
comfyanonymous 2023-11-16 12:57:12 -05:00
parent 5514c4b8ce
commit 87d2cb7b0b

View File

@ -255,7 +255,10 @@ def apply_control(h, control, name):
if control is not None and name in control and len(control[name]) > 0:
ctrl = control[name].pop()
if ctrl is not None:
h += ctrl
try:
h += ctrl
except:
print("warning control could not be applied", h.shape, ctrl.shape)
return h
class UNetModel(nn.Module):