From de2b78a69cca8ecdff60323b522d2fc2baea0398 Mon Sep 17 00:00:00 2001 From: pftq Date: Wed, 26 Feb 2025 13:22:15 -0800 Subject: [PATCH] Fixed I2V Frames Hardcoded at 81 - updated frame_num to F for consistency --- wan/image2video.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wan/image2video.py b/wan/image2video.py index 66d8eea..822a233 100644 --- a/wan/image2video.py +++ b/wan/image2video.py @@ -205,7 +205,7 @@ class WanI2V: device=self.device) #20250226 fix noise assuming frames hardcoded at 81 (21 latent frames) - latent_frame_num = (frame_num - 1) // self.vae_stride[0] + 1 + latent_frame_num = (F - 1) // self.vae_stride[0] + 1 noise = torch.randn(16, latent_frame_num, lat_h, lat_w, dtype=torch.float32, generator=seed_g, device=self.device) #msk = torch.ones(1, 81, lat_h, lat_w, device=self.device)