From e11695a305ac1d52ae55454356f1d14a725cdca0 Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Sat, 1 Feb 2025 23:58:46 +0200 Subject: [PATCH] Update nodes.py --- nodes/nodes.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nodes/nodes.py b/nodes/nodes.py index cc9809f..d6cf23d 100644 --- a/nodes/nodes.py +++ b/nodes/nodes.py @@ -2233,6 +2233,7 @@ class LeapfusionHunyuanI2V: "model": ("MODEL",), "latent": ("LATENT",), "index": ("INT", {"default": 0, "min": -1, "max": 1000, "step": 1,"tooltip": "The index of the latent to be replaced. 0 for first frame and -1 for last"}), + "strength": ("FLOAT", {"default": 1.0, "min": -10.0, "max": 10.0, "step": 0.001}), } } @@ -2241,7 +2242,7 @@ class LeapfusionHunyuanI2V: CATEGORY = "KJNodes/experimental" - def patch(self, model, latent, index): + def patch(self, model, latent, index, strength): def outer_wrapper(samples, index): def unet_wrapper(apply_model, args): @@ -2251,7 +2252,7 @@ class LeapfusionHunyuanI2V: return apply_model(inp, timestep, **c) return unet_wrapper - samples = latent["samples"] * 0.476986 + samples = latent["samples"] * 0.476986 * strength m = model.clone() m.set_model_unet_function_wrapper(outer_wrapper(samples, index))