Backend: Allow control signal to be none for advanced weighting

This commit is contained in:
lllyasviel
2024-02-07 13:02:42 -08:00
parent c3a66b016b
commit ef781cabcb

View File

@@ -64,6 +64,10 @@ def compute_controlnet_weighting(control, cnet):
for k, v in control.items():
for i in range(len(v)):
control_signal = control[k][i]
if not isinstance(control_signal, torch.Tensor):
continue
B, C, H, W = control_signal.shape
positive_weight = 1.0