Skip to content

Commit 4033579

Browse files
committed
update
1 parent 549c101 commit 4033579

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/diffusers/pipelines/hunyuan_video/pipeline_hunyuan_video.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ def prepare_latents(
402402
shape = (
403403
batch_size,
404404
num_channels_latents,
405-
num_frames,
405+
(num_frames - 1) // self.vae_scale_factor_temporal + 1,
406406
int(height) // self.vae_scale_factor_spatial,
407407
int(width) // self.vae_scale_factor_spatial,
408408
)
@@ -624,13 +624,12 @@ def __call__(
624624

625625
# 5. Prepare latent variables
626626
num_channels_latents = self.transformer.config.in_channels
627-
num_latent_frames = (num_frames - 1) // self.vae_scale_factor_temporal + 1
628627
latents = self.prepare_latents(
629628
batch_size * num_videos_per_prompt,
630629
num_channels_latents,
631630
height,
632631
width,
633-
num_latent_frames,
632+
num_frames,
634633
torch.float32,
635634
device,
636635
generator,

0 commit comments

Comments
 (0)