Open-Sora: Democratizing Efficient Video Production for All
Python
debug
Shen-Chenhuidbda9e9c3ae5
diff --git a/opensora/models/vae/model_utils.py b/opensora/models/vae/model_utils.pyindex 37403ce..ace3c4b 100644--- a/opensora/models/vae/model_utils.py+++ b/opensora/models/vae/model_utils.py@@ -6,7 +6,7 @@ import torch.nn as nnimport numpy as npimport torchfrom taming.modules.losses.lpips import LPIPS # need to pip install https://github.com/CompVis/taming-transformers-+from taming.modules.discriminator.model import NLayerDiscriminator, weights_init## NOTE: not used since we only have 'GN'# def get_norm_layer(norm_type, dtype):@@ -128,7 +128,8 @@ class VEA3DLossWithPerceptualLoss(nn.Module):assert disc_loss in ["hinge", "vanilla"]self.kl_weight = kl_weightself.pixel_weight = pixelloss_weight- self.perceptual_loss = LPIPS().eval()+ self.perceptual_loss = LPIPS()+ self.perceptual_loss.eval()self.perceptual_weight = perceptual_weight# output log varianceself.logvar = nn.Parameter(torch.ones(size=()) * logvar_init)