Fix potential issue with hydit controlnets.

This commit is contained in:
comfyanonymous 2024-08-30 04:58:41 -04:00
parent 472f1d5bbc
commit 573d09ea33

View File

@ -372,7 +372,7 @@ class HunYuanDiT(nn.Module):
for layer, block in enumerate(self.blocks):
if layer > self.depth // 2:
if controls is not None:
skip = skips.pop() + controls.pop()
skip = skips.pop() + controls.pop().to(dtype=x.dtype)
else:
skip = skips.pop()
x = block(x, c, text_states, freqs_cis_img, skip) # (N, L, D)