Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

Fix issue with .view() in HuMo. (#10014)

comfyanonymousfccab99ec0fc
diff --git a/comfy/ldm/wan/model.py b/comfy/ldm/wan/model.py
index 2dac5980c..54616e6eb 100644
--- a/comfy/ldm/wan/model.py
+++ b/comfy/ldm/wan/model.py
@@ -1355,7 +1355,7 @@ class WanT2VCrossAttentionGather(WanSelfAttention):
x = optimized_attention(q, k, v, heads=self.num_heads, skip_reshape=True, skip_output_reshape=True, transformer_options=transformer_options)
- x = x.transpose(1, 2).view(b, -1, n, d).flatten(2)
+ x = x.transpose(1, 2).reshape(b, -1, n * d)
x = self.o(x)
return x