From 06a86923e7173931daa8b8f2a6316936998f2af2 Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Sun, 21 Dec 2025 22:53:25 +0200 Subject: [PATCH] Fix ref latent oops --- nodes_sampler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nodes_sampler.py b/nodes_sampler.py index 0b9dd88..6fb0672 100644 --- a/nodes_sampler.py +++ b/nodes_sampler.py @@ -879,8 +879,9 @@ class WanVideoSampler: longcat_ref_latent = None longcat_avatar_options = image_embeds.get("longcat_avatar_options", None) if longcat_avatar_options is not None: - longcat_ref_latent = image_embeds.get("longcat_ref_latent", None) + longcat_ref_latent = longcat_avatar_options.get("longcat_ref_latent", None) if longcat_ref_latent is not None: + log.info(f"LongCat-Avatar reference latent shape: {longcat_ref_latent.shape}") latent = torch.cat([longcat_ref_latent.to(latent), latent], dim=1) seq_len = math.ceil((latent.shape[2] * latent.shape[3]) / 4 * latent.shape[1]) insert_len = longcat_ref_latent.shape[1]