From 0417c8ea00d36b8145b36187cfe9cd2eb25df96c Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Thu, 17 Jul 2025 20:48:16 +0300 Subject: [PATCH] Update nodes.py --- nodes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nodes.py b/nodes.py index 0ae9e3a..f4ae73d 100644 --- a/nodes.py +++ b/nodes.py @@ -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}")