Skip to content

Commit 87beae7

Browse files
authored
Fix HunyuanVideo 1.5 I2V by preprocessing image at pixel resolution i… (#13440)
Fix HunyuanVideo 1.5 I2V by preprocessing image at pixel resolution instead of latent resolution
1 parent 251676d commit 87beae7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/diffusers/pipelines/hunyuan_video1_5/pipeline_hunyuan_video1_5_image2video.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ def prepare_cond_latents_and_mask(
611611
tuple: (cond_latents_concat, mask_concat) - both are zero tensors for t2v
612612
"""
613613

614-
batch, channels, frames, height, width = latents.shape
614+
batch, channels, frames, latent_height, latent_width = latents.shape
615615

616616
image_latents = self._get_image_latents(
617617
vae=self.vae,
@@ -626,7 +626,7 @@ def prepare_cond_latents_and_mask(
626626
latent_condition[:, :, 1:, :, :] = 0
627627
latent_condition = latent_condition.to(device=device, dtype=dtype)
628628

629-
latent_mask = torch.zeros(batch, 1, frames, height, width, dtype=dtype, device=device)
629+
latent_mask = torch.zeros(batch, 1, frames, latent_height, latent_width, dtype=dtype, device=device)
630630
latent_mask[:, :, 0, :, :] = 1.0
631631

632632
return latent_condition, latent_mask

0 commit comments

Comments
 (0)