From 81e7022ab58c83ad659637d4448f83cc0db6eb54 Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Tue, 27 May 2025 18:06:36 +0300 Subject: [PATCH] Force steps to match possible cfg schedule length --- nodes.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nodes.py b/nodes.py index b69cbc6..3c9d882 100644 --- a/nodes.py +++ b/nodes.py @@ -2312,6 +2312,11 @@ class WanVideoSampler: steps = int(steps/denoise_strength) + if isinstance(cfg, list): + if steps != len(cfg): + log.info(f"Received {len(cfg)} cfg values, but only {steps} steps. Setting step count to match.") + steps = len(cfg) + timesteps = None if 'unipc' in scheduler: sample_scheduler = FlowUniPCMultistepScheduler(shift=shift)