File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
src/diffusers/pipelines/hunyuan_video Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -402,7 +402,7 @@ def prepare_latents(
402
402
shape = (
403
403
batch_size ,
404
404
num_channels_latents ,
405
- num_frames ,
405
+ ( num_frames - 1 ) // self . vae_scale_factor_temporal + 1 ,
406
406
int (height ) // self .vae_scale_factor_spatial ,
407
407
int (width ) // self .vae_scale_factor_spatial ,
408
408
)
@@ -624,13 +624,12 @@ def __call__(
624
624
625
625
# 5. Prepare latent variables
626
626
num_channels_latents = self .transformer .config .in_channels
627
- num_latent_frames = (num_frames - 1 ) // self .vae_scale_factor_temporal + 1
628
627
latents = self .prepare_latents (
629
628
batch_size * num_videos_per_prompt ,
630
629
num_channels_latents ,
631
630
height ,
632
631
width ,
633
- num_latent_frames ,
632
+ num_frames ,
634
633
torch .float32 ,
635
634
device ,
636
635
generator ,
You can’t perform that action at this time.
0 commit comments