File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
src/diffusers/pipelines/hunyuan_video Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -387,7 +387,7 @@ def check_inputs(
387387 def prepare_latents (
388388 self ,
389389 batch_size : int ,
390- num_channels_latents : 32 ,
390+ num_channels_latents : int = 32 ,
391391 height : int = 720 ,
392392 width : int = 1280 ,
393393 num_frames : int = 129 ,
@@ -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 ,
You can’t perform that action at this time.
0 commit comments