From a64f115d35a3ac017bbd27458ef8a9c44eb385cc Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Wed, 29 Oct 2025 11:06:38 +0200 Subject: [PATCH] Fix to previous --- nodes_sampler.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/nodes_sampler.py b/nodes_sampler.py index 6575c2b..6e14403 100644 --- a/nodes_sampler.py +++ b/nodes_sampler.py @@ -2255,10 +2255,12 @@ class WanVideoSampler: timesteps.append(0.) timesteps = [torch.tensor([t], device=device) for t in timesteps] timesteps = [timestep_transform(t, shift=shift, num_timesteps=1000) for t in timesteps] - elif isinstance(scheduler, dict): - sample_scheduler = copy.deepcopy(scheduler["sample_scheduler"]) else: - sample_scheduler, timesteps,_,_ = get_scheduler(scheduler, total_steps, start_step, end_step, shift, device, transformer.dim, flowedit_args, denoise_strength, sigmas=sigmas) + if isinstance(scheduler, dict): + sample_scheduler = copy.deepcopy(scheduler["sample_scheduler"]) + timesteps = scheduler["timesteps"] + else: + sample_scheduler, timesteps,_,_ = get_scheduler(scheduler, total_steps, start_step, end_step, shift, device, transformer.dim, flowedit_args, denoise_strength, sigmas=sigmas) timesteps = [torch.tensor([float(t)], device=device) for t in timesteps] + [torch.tensor([0.], device=device)] # sample videos @@ -2571,6 +2573,7 @@ class WanVideoSampler: if isinstance(scheduler, dict): sample_scheduler = copy.deepcopy(scheduler["sample_scheduler"]) + timesteps = scheduler["timesteps"] else: sample_scheduler, timesteps,_,_ = get_scheduler(scheduler, total_steps, start_step, end_step, shift, device, transformer.dim, flowedit_args, denoise_strength, sigmas=sigmas) @@ -2791,6 +2794,7 @@ class WanVideoSampler: if isinstance(scheduler, dict): sample_scheduler = copy.deepcopy(scheduler["sample_scheduler"]) + timesteps = scheduler["timesteps"] else: sample_scheduler, timesteps,_,_ = get_scheduler(scheduler, total_steps, start_step, end_step, shift, device, transformer.dim, flowedit_args, denoise_strength, sigmas=sigmas)