HunyuanVideo: A Systematic Framework For Large Video Generation Model
remove unused code
Changlin-Lee907b7e4da3e1
diff --git a/hyvideo/vae/unet_causal_3d_blocks.py b/hyvideo/vae/unet_causal_3d_blocks.pyindex 69fbd21..bc02cab 100644--- a/hyvideo/vae/unet_causal_3d_blocks.py+++ b/hyvideo/vae/unet_causal_3d_blocks.py@@ -120,11 +120,6 @@ class UpsampleCausal3D(nn.Module):conv = Noneif use_conv_transpose:assert False, "Not Implement yet"- if kernel_size is None:- kernel_size = 4- conv = nn.ConvTranspose2d(- channels, self.out_channels, kernel_size=kernel_size, stride=2, padding=padding, bias=bias- )elif use_conv:if kernel_size is None:kernel_size = 3@@ -146,8 +141,6 @@ class UpsampleCausal3D(nn.Module):if self.norm is not None:assert False, "Not Implement yet"- hidden_states = self.norm(- hidden_states.permute(0, 2, 3, 1)).permute(0, 3, 1, 2)if self.use_conv_transpose:return self.conv(hidden_states)@@ -177,8 +170,6 @@ class UpsampleCausal3D(nn.Module):first_h = first_h.unsqueeze(2)else:assert False, "Not Implement yet"- other_h = F.interpolate(- other_h, size=output_size, mode="nearest")if T > 1:hidden_states = torch.cat((first_h, other_h), dim=2)diff --git a/hyvideo/vae/vae.py b/hyvideo/vae/vae.pyindex 527e4a9..d6e098e 100644--- a/hyvideo/vae/vae.py+++ b/hyvideo/vae/vae.py@@ -71,10 +71,6 @@ class EncoderCausal3D(nn.Module):i < num_spatial_downsample_layers)add_time_downsample = bool(i >= (len(block_out_channels) - 1 - num_time_downsample_layers) and not is_final_block)- elif time_compression_ratio == 8:- add_spatial_downsample = bool(- i < num_spatial_downsample_layers)- add_time_downsample = bool(i < num_time_downsample_layers)else:raise ValueError(f"Unsupported time_compression_ratio: {time_compression_ratio}")