Open-Sora: Democratizing Efficient Video Production for All
Python
debug
Shen-Chenhuic0632b3fb3ce
diff --git a/opensora/models/vae/vae_3d_v2.py b/opensora/models/vae/vae_3d_v2.pyindex 82f04f5..ff0662f 100644--- a/opensora/models/vae/vae_3d_v2.py+++ b/opensora/models/vae/vae_3d_v2.py@@ -239,6 +239,9 @@ class ResBlockDown(nn.Module):self.conv3 = nn.Conv3d(in_channels, self.filters, (3,3,3)) # NOTE: init to xavier_uniformself.norm2 = nn.GroupNorm(num_groups, self.filters, device=device, dtype=dtype)+ self.apply(xavier_uniform_weight_init)+ self.to(device, dtype)+def forward(self, x):residual = xx = self.conv1(x)@@ -312,7 +315,8 @@ class StyleGANDiscriminator(nn.Module):self.linear1 = nn.Linear(in_features, prev_filters, device=device, dtype=dtype) # NOTE: init to xavier_uniformself.linear2 = nn.Linear(prev_filters, 1, device=device, dtype=dtype) # NOTE: init to xavier_uniform- self.apply(xavier_uniform_weight_init) # TODO: DOUBLE CHECK IF RESBLOCK GETS XAVIER_UNIFORM+ self.apply(xavier_uniform_weight_init)+ self.to(device, dtype)def forward(self, x):@@ -706,7 +710,6 @@ class VAE_3D_V2(nn.Module):dtype = dtype,device = device,)- self.disc.apply(xavier_uniform_weight_init)def get_latent_size(self, input_size):