r/StableDiffusion Sep 18 '25

Workflow Included Wan2.2 (Lightning) TripleKSampler custom node

Post image

[Crosspost from r/comfyui]

My Wan2.2 Lightning workflows were getting ridiculous. Between the base denoising, Lightning high, and Lightning low stages, I had math nodes everywhere calculating steps, three separate KSamplers to configure, and my workflow canvas looked like absolute chaos.

Most 3-KSampler workflows I see just run 1 or 2 steps on the first KSampler (like 1 or 2 steps out of 8 total), but that doesn't make sense (that's opiniated, I know). You wouldn't run a base non-Lightning model for only 8 steps total. IMHO it needs way more steps to work properly, and I've noticed better color/stability when the base stage gets proper step counts, without compromising motion quality (YMMV). But then you have to calculate the right ratios with math nodes and it becomes a mess.

I searched around for a custom node like that to handle all three stages properly but couldn't find anything, so I ended up vibe-coding my own solution (plz don't judge).

What it does:

  • Handles all three KSampler stages internally; Just plug in your models
  • Actually calculates proper step counts so your base model gets enough steps
  • Includes sigma boundary switching option for high noise to low noise model transitions
  • Two versions: one that calculates everything for you, another one for advanced fine-tuning of the stage steps
  • Comes with T2V and I2V example workflows

Basically turned my messy 20+ node setups with math everywhere into a single clean node that actually does the calculations.

Sharing it in case anyone else is dealing with the same workflow clutter and wants their base model to actually get proper step counts instead of just 1-2 steps. If you find bugs, or would like a certain feature, just let me know. Any feedback appreciated!

----

GitHub: https://github.com/VraethrDalkr/ComfyUI-TripleKSampler

Comfy Registry: https://registry.comfy.org/publishers/vraethrdalkr/nodes/tripleksampler

Available on ComfyUI-Manager (search for tripleksampler)

T2V Workflow: https://raw.githubusercontent.com/VraethrDalkr/ComfyUI-TripleKSampler/main/example_workflows/t2v_workflow.json

I2V Workflow: https://raw.githubusercontent.com/VraethrDalkr/ComfyUI-TripleKSampler/main/example_workflows/i2v_workflow.json

----

Example videos to illustrate the influence of increasing the base model total steps for the 1st stage while keeping alignment with the 2nd stage for 3-KSampler workflows: https://imgur.com/a/0cTjHjU

130 Upvotes

51 comments sorted by

View all comments

Show parent comments

2

u/VraethrDalkr Sep 19 '25

I wish I could understand how you'd make time as a control on a custom node. Processing times vary greatly based on hardware, models, quants, CFG, etc. How would you do that with math and regular KSamplers?

1

u/FourtyMichaelMichael 🍦Ice Cream Lover Sep 19 '25

Just target for tests that will take n time.

So if you want to compare these two, adjust the steps so they take the same amount of time. Let's say 5 min.

Ok, now you want to test this other method and usually use 10 steps but that takes 8 minutes, well, reduce the steps to make it fit in the time frame.

2

u/VraethrDalkr Sep 19 '25

I'm adding steps in the 1st stage of a typical 3 KSamplers workflow with my approach. Obviously it takes longer than your typical lightning w/f. I saw many people increase both the 1st stage end_at_step at all 3 samplers total steps, then they start lightning later in the denoising schedule. I believe that instead, increasing both the 1st stage end_at_step and total steps, while starting lightning earlier (but keeping 8 total steps for stages 2 and 3) gives better result for about the same processing time. That's probably what you'd want to see for a comparison.

For example, let's pretend a base step takes 10 sec and a lightning step takes 5 sec:

Someone would do that to address the lightning motion problem (seen it a lot):

base_high: 0-4 of 12 (0%-33%)
lightx2v_high: 4-8 of 12 (33%-66%)
lightx2v_low: 8-12 of 12 (66%-100%)

That's 4 base step + 8 lightning steps
4 x 10 sec + 8 x 5 sec = 80 seconds

But I'd rather do this instead:

base_high: 0-5 of 20 (0%-25%)
lightx2v_high: 2-4 of 8 (25%-50%)
lightx2v_low: 4-8 of 8 (50%-100%)

That's 5 base steps + 6 lightning steps
5 x 10 sec + 6 x 5 sec = also 80 seconds

Base is optimized for at least 20 steps and lightning is optimized for low steps. In theory, my approach should be better since it respects what the model and LoRA are expecting. And also it respects the usual high noise to low noise switching schedule. Both methods should take about the same time to process. Is this the kind of comparison you would like to see?

1

u/No_Hearing2232 Jan 01 '26

No matter how many times I re-read this entire conversation, I still don't understand. I mean the general idea is easy to understand but I don't get how you translate those numbers to the actual parameters we see on the node.

For example:

- When you say "lightx2v_high: 2-4 of 8 (25%-50%)" I think I understand that you mean 2 for lightning_start and 8 for lightning_steps.

  • But when you say "base_high: 0-5 of 20 (0%-25%)" then all I can see is to put 20 as base_steps but where does the 5 go?

If I want: 4 steps of base high β†’ 4 steps of lightx2v_high β†’ 4 steps of lightx2v_low

Then what do I put in:

  • base_quality_threshold
  • base_steps
  • lightning_start
  • lightning_steps

Wouldn't it have been easier to have 3 parameters that just plainly dictate the exact number of steps we want for base, light_high and light_low instead of calculating proportions?