WanAnimate: Fix first latent issue when not using bg_images and looping

This commit is contained in:
kijai
2025-09-20 20:14:39 +03:00
parent a90ee9773f
commit b9fd93c19e
4 changed files with 55 additions and 115 deletions
+1 -1
View File
@@ -219,7 +219,7 @@ class HuMoEmbeds:
vae.to(device)
zero_frames = torch.zeros(1, 3, pixel_frame_num + 4*num_refs, height, width, device=device, dtype=vae.dtype)
zero_latents = vae.encode(zero_frames, device=device, tiled=tiled_vae)[0].to(offload_device)
vae.model.clear_cache()
vae.to(offload_device)
mm.soft_empty_cache()