Commit 281ad42d authored by comfyanonymous's avatar comfyanonymous
Browse files

Fix lowvram union controlnet bug.

parent 1cde6b2e
...@@ -361,7 +361,7 @@ class ControlNet(nn.Module): ...@@ -361,7 +361,7 @@ class ControlNet(nn.Module):
controlnet_cond = self.input_hint_block(hint[idx], emb, context) controlnet_cond = self.input_hint_block(hint[idx], emb, context)
feat_seq = torch.mean(controlnet_cond, dim=(2, 3)) feat_seq = torch.mean(controlnet_cond, dim=(2, 3))
if idx < len(control_type): if idx < len(control_type):
feat_seq += self.task_embedding[control_type[idx]] feat_seq += self.task_embedding[control_type[idx]].to(dtype=feat_seq.dtype, device=feat_seq.device)
inputs.append(feat_seq.unsqueeze(1)) inputs.append(feat_seq.unsqueeze(1))
condition_list.append(controlnet_cond) condition_list.append(controlnet_cond)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment