From 71351c09841d32f9f4b399d75b43f5299d981aef Mon Sep 17 00:00:00 2001 From: ozbayb <17261091+ozbayb@users.noreply.github.com> Date: Mon, 17 Mar 2025 13:51:06 -0600 Subject: [PATCH] Fix for substep scheduling of patches with multiples conds --- nodes/model_optimization_nodes.py | 2 +- nodes/nodes.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nodes/model_optimization_nodes.py b/nodes/model_optimization_nodes.py index c7b150d..5dfaf95 100644 --- a/nodes/model_optimization_nodes.py +++ b/nodes/model_optimization_nodes.py @@ -914,7 +914,7 @@ Official recommended values https://github.com/ali-vilab/TeaCache/tree/main/TeaC else: for i in range(len(sigmas) - 1): # walk from beginning of steps until crossing the timestep - if (sigmas[i] - timestep) * (sigmas[i + 1] - timestep) <= 0: + if (sigmas[i] - timestep[0]) * (sigmas[i + 1] - timestep[0]) <= 0: current_step_index = i break else: diff --git a/nodes/nodes.py b/nodes/nodes.py index 8580366..719ae40 100644 --- a/nodes/nodes.py +++ b/nodes/nodes.py @@ -2303,7 +2303,7 @@ class LeapfusionHunyuanI2V: else: for i in range(len(steps) - 1): # walk from beginning of steps until crossing the timestep - if (steps[i] - timestep) * (steps[i + 1] - timestep) <= 0: + if (steps[i] - timestep[0]) * (steps[i + 1] - timestep[0]) <= 0: current_step_index = i break else: @@ -2465,7 +2465,7 @@ class Guider_ScheduledCFG(CFGGuider): else: for i in range(len(steps) - 1): # walk from beginning of steps until crossing the timestep - if (steps[i] - timestep) * (steps[i + 1] - timestep) <= 0: + if (steps[i] - timestep[0]) * (steps[i + 1] - timestep[0]) <= 0: current_step_index = i break else: