diff --git a/src/diffusers/models/transformers/transformer_wan_animate.py b/src/diffusers/models/transformers/transformer_wan_animate.py index 538a029cd832..ae1c3095a17f 100644 --- a/src/diffusers/models/transformers/transformer_wan_animate.py +++ b/src/diffusers/models/transformers/transformer_wan_animate.py @@ -340,7 +340,8 @@ def forward(self, face_image: torch.Tensor, channel_dim: int = 1) -> torch.Tenso weight = self.motion_synthesis_weight + 1e-8 # Upcast the QR orthogonalization operation to FP32 original_motion_dtype = motion_feat.dtype - motion_feat = motion_feat.to(weight.dtype) + motion_feat = motion_feat.to(torch.float32) + weight = weight.to(torch.float32) Q = torch.linalg.qr(weight)[0].to(device=motion_feat.device)