Unverified Commit f0707751 authored by Aryan's avatar Aryan Committed by GitHub
Browse files

Some consistency-related fixes for HunyuanVideo (#10835)

* update

* update
parent d9ee3879
...@@ -387,7 +387,7 @@ class HunyuanVideoPipeline(DiffusionPipeline, HunyuanVideoLoraLoaderMixin): ...@@ -387,7 +387,7 @@ class HunyuanVideoPipeline(DiffusionPipeline, HunyuanVideoLoraLoaderMixin):
def prepare_latents( def prepare_latents(
self, self,
batch_size: int, batch_size: int,
num_channels_latents: 32, num_channels_latents: int = 32,
height: int = 720, height: int = 720,
width: int = 1280, width: int = 1280,
num_frames: int = 129, num_frames: int = 129,
...@@ -402,7 +402,7 @@ class HunyuanVideoPipeline(DiffusionPipeline, HunyuanVideoLoraLoaderMixin): ...@@ -402,7 +402,7 @@ class HunyuanVideoPipeline(DiffusionPipeline, HunyuanVideoLoraLoaderMixin):
shape = ( shape = (
batch_size, batch_size,
num_channels_latents, num_channels_latents,
num_frames, (num_frames - 1) // self.vae_scale_factor_temporal + 1,
int(height) // self.vae_scale_factor_spatial, int(height) // self.vae_scale_factor_spatial,
int(width) // self.vae_scale_factor_spatial, int(width) // self.vae_scale_factor_spatial,
) )
...@@ -624,13 +624,12 @@ class HunyuanVideoPipeline(DiffusionPipeline, HunyuanVideoLoraLoaderMixin): ...@@ -624,13 +624,12 @@ class HunyuanVideoPipeline(DiffusionPipeline, HunyuanVideoLoraLoaderMixin):
# 5. Prepare latent variables # 5. Prepare latent variables
num_channels_latents = self.transformer.config.in_channels num_channels_latents = self.transformer.config.in_channels
num_latent_frames = (num_frames - 1) // self.vae_scale_factor_temporal + 1
latents = self.prepare_latents( latents = self.prepare_latents(
batch_size * num_videos_per_prompt, batch_size * num_videos_per_prompt,
num_channels_latents, num_channels_latents,
height, height,
width, width,
num_latent_frames, num_frames,
torch.float32, torch.float32,
device, device,
generator, generator,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment