mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-03-15 14:09:36 +00:00
Fix lowvram union controlnet bug.
This commit is contained in:
parent
1cde6b2eff
commit
281ad42df4
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user