Fix WanAnimate to use ref_latent without bg_images

This commit is contained in:
Anastasiy Safari
2025-10-15 17:28:19 -07:00
parent 50483a3b54
commit be02ec93cc
+3
View File
@@ -2666,6 +2666,9 @@ class WanVideoSampler:
del temporal_ref_latents, msk, bg_image_slice
else:
image_cond_in = torch.cat([torch.tile(torch.zeros_like(noise[:1]), [4, 1, 1, 1]), torch.zeros_like(noise)], dim=0).to(device)
elif ref_latent is not None:
# Use ref_latent even without bg_images
image_cond_in = torch.cat([ref_latent.to(device), torch.zeros_like(noise)], dim=1)
else:
image_cond_in = torch.cat([torch.tile(torch.zeros_like(noise[:1]), [4, 1, 1, 1]), torch.zeros_like(noise)], dim=0).to(device)