Open-Sora: Democratizing Efficient Video Production for All
Python
update stdit dtype (#392)
Zheng Zangwei (Alex Zheng)3893af0a62d9
diff --git a/opensora/models/stdit/stdit.py b/opensora/models/stdit/stdit.pyindex 6882572..0bb3d5d 100644--- a/opensora/models/stdit/stdit.py+++ b/opensora/models/stdit/stdit.py@@ -267,10 +267,10 @@ class STDiT(nn.Module):Returns:x (torch.Tensor): output latent representation; of shape [B, C, T, H, W]"""-- x = x.to(self.dtype)- timestep = timestep.to(self.dtype)- y = y.to(self.dtype)+ dtype = self.x_embedder.proj.weight.dtype+ x = x.to(dtype)+ timestep = timestep.to(dtype)+ y = y.to(dtype)# embeddingx = self.x_embedder(x) # [B, N, C]