Skip to content

Commit 281ad42

Browse files
Fix lowvram union controlnet bug.
1 parent 1cde6b2 commit 281ad42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

comfy/cldm/cldm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ def union_controlnet_merge(self, hint, control_type, emb, context):
361361
controlnet_cond = self.input_hint_block(hint[idx], emb, context)
362362
feat_seq = torch.mean(controlnet_cond, dim=(2, 3))
363363
if idx < len(control_type):
364-
feat_seq += self.task_embedding[control_type[idx]]
364+
feat_seq += self.task_embedding[control_type[idx]].to(dtype=feat_seq.dtype, device=feat_seq.device)
365365

366366
inputs.append(feat_seq.unsqueeze(1))
367367
condition_list.append(controlnet_cond)

0 commit comments

Comments
 (0)