From b8d7d555688efd7c573faa52737e346843fcbca7 Mon Sep 17 00:00:00 2001 From: Yudong Jin Date: Sat, 1 Nov 2025 03:11:03 +0800 Subject: [PATCH] Fix dtype issue in time embedding calculation --- diffsynth/models/wan_video_dit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/diffsynth/models/wan_video_dit.py b/diffsynth/models/wan_video_dit.py index cdebad4..2872d4b 100644 --- a/diffsynth/models/wan_video_dit.py +++ b/diffsynth/models/wan_video_dit.py @@ -362,7 +362,7 @@ class WanModel(torch.nn.Module): **kwargs, ): t = self.time_embedding( - sinusoidal_embedding_1d(self.freq_dim, timestep)) + sinusoidal_embedding_1d(self.freq_dim, timestep).to(x.dtype)) t_mod = self.time_projection(t).unflatten(1, (6, self.dim)) context = self.text_embedding(context)