From 07c7fc6c2aeb8b0758b57e50feb50a5585523955 Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Tue, 27 May 2025 19:14:22 +0300 Subject: [PATCH] Don't show Phantom references in live preview --- controlnet/nodes.py | 2 +- nodes.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/controlnet/nodes.py b/controlnet/nodes.py index 8b48469..14975d1 100644 --- a/controlnet/nodes.py +++ b/controlnet/nodes.py @@ -125,7 +125,7 @@ class WanVideoControlnetApply: "model": ("WANVIDEOMODEL", ), "controlnet": ("WANVIDEOCONTROLNET", ), "control_images": ("IMAGE", ), - "strength": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 1.0, "step": 0.0001, "tooltip": "controlnet strength"}), + "strength": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 10.0, "step": 0.0001, "tooltip": "controlnet strength"}), "control_stride": ("INT", {"default": 3, "min": 1, "max": 8, "step": 1, "tooltip": "controlnet stride"}), "control_start_percent": ("FLOAT", {"default": 0.0, "min": 0.0, "max": 1.0, "step": 0.01, "tooltip": "Start percent of the steps to apply controlnet"}), "control_end_percent": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 1.0, "step": 0.01, "tooltip": "End percent of the steps to apply controlnet"}), diff --git a/nodes.py b/nodes.py index 3c9d882..5a0af34 100644 --- a/nodes.py +++ b/nodes.py @@ -3349,6 +3349,8 @@ class WanVideoSampler: if callback is not None: if recammaster is not None: callback_latent = (latent_model_input[:, :orig_noise_len].to(device) - noise_pred[:, :orig_noise_len].to(device) * t.to(device) / 1000).detach().permute(1,0,2,3) + if phantom_latents is not None: + callback_latent = (latent_model_input[:,:-phantom_latents.shape[1]].to(device) - noise_pred[:,:-phantom_latents.shape[1]].to(device) * t.to(device) / 1000).detach().permute(1,0,2,3) else: callback_latent = (latent_model_input.to(device) - noise_pred.to(device) * t.to(device) / 1000).detach().permute(1,0,2,3) callback(idx, callback_latent, None, steps)