Update nodes.py

This commit is contained in:
kijai
2025-07-17 20:48:16 +03:00
parent 31b2c686cf
commit 0417c8ea00
+2 -2
View File
@@ -2340,9 +2340,9 @@ class WanVideoSampler:
if mask.shape[2] != noise.shape[1]:
mask = torch.cat([torch.zeros(1, noise.shape[0], noise.shape[1] - mask.shape[2], noise.shape[2], noise.shape[3]), mask], dim=2)
if (extra_latents := image_embeds.get("extra_latents"), None) is not None:
if (extra_latents := image_embeds.get("extra_latents", None)) is not None:
encoded_image_latents = extra_latents["samples"].squeeze(0).to(noise)
if (empty_latent_indices := extra_latents.get("empty_latent_indices"), None) is not None and len(empty_latent_indices) > 0:
if (empty_latent_indices := extra_latents.get("empty_latent_indices", None)) is not None and len(empty_latent_indices) > 0:
noise_out = encoded_image_latents.clone()
for idx in empty_latent_indices:
#print(f"Adding noise to Empty latent index: {idx}")