Open-Sora: Democratizing Efficient Video Production for All
Python
debug
Shen-Chenhui996e6fb18041
diff --git a/opensora/models/vae/model_utils.py b/opensora/models/vae/model_utils.pyindex 28575da..d1347ff 100644--- a/opensora/models/vae/model_utils.py+++ b/opensora/models/vae/model_utils.py@@ -297,7 +297,7 @@ class VEA3DLossWithPerceptualLoss(nn.Module):# SCH: transform to [(B,T), C, H, W] shape for percetual loss over each framepermutated_input = torch.permute(inputs, (0, 2, 1, 3, 4)) # [B, C, T, H, W] --> [B, T, C, H, W]permutated_rec = torch.permute(reconstructions, (0, 2, 1, 3, 4))- data_shape = inputs.size()+ data_shape = permutated_input.size()p_loss = self.perceptual_loss(permutated_input.reshape(-1, data_shape[-3], data_shape[-2],data_shape[-1]).contiguous(),permutated_rec.reshape(-1, data_shape[-3], data_shape[-2],data_shape[-1]).contiguous()