Nodes/CRT-Nodes/Strength to Steps (CRT)
ComfyUI Node

Strength to Steps (CRT)

Strength to Steps (CRT)

By PGCRT·Created 2 years ago·Updated a day ago· 132
Strength to Steps (CRT)
    • total_steps
    • start_step
    desired_steps6
    strength_percent40

    Strength to Steps (CRT) is a tiny math node that solves a genuinely confusing part of ComfyUI's sampler: how many steps to run when your real intention is "a 40% strength second pass." You feed it your desired denoising strength and the number of actual sampling steps you want, and it returns the two numbers you plug into a KSampler's start_at_step and end_at_step. That's the whole thing, and it earns its place.

    Here's the confusion it kills. In A1111 you say "denoise 0.4" and the tool silently does the math. In ComfyUI, a KSampler has denoise, but when you're working with start_at_step/end_at_step (or using the KSampler Advanced nodes, or chaining a partial pass into a longer schedule), the strength is expressed as a position in the step schedule, not as a standalone percentage. To run only the last 40% of a schedule you need to know the total and where to start. That's what this node computes:

    • total_steps = desired_steps / (strength_percent / 100), rounded
    • start_step = total_steps - desired_steps

    So with desired_steps = 6 and strength_percent = 40, you get total_steps = 15 and start_step = 9. Feed those into a sampler with end_at_step = 15 and start_at_step = 9, and the sampler runs exactly six denoising steps covering the final 40% of the schedule - which is precisely what a "0.4 denoise" pass means when the schedule is already partly denoised. It's the same relationship the KB's hi-res-fix guidance relies on: a second pass at lower strength isn't fewer total steps, it's a window of the schedule, and this node computes that window for you.

    The two required inputs are desired_steps (how many denoising steps you actually want, default 6) and strength_percent (default 40). Outputs are total_steps and start_step, both INTs, made to order for a KSampler (Advanced)'s step ports. Because it's pure arithmetic you can wire it into the same sampler every time and just change one of the two inputs - the total and start follow along.

    Where people get tripped up: this computes positions, not a literal "reduce denoise" dial. If you instead feed denoise directly on a plain KSampler, ComfyUI does its own equivalent math internally - you don't need this node there. Reach for it when you're using advanced samplers, staged multi-sampler graphs, or any place where start_at_step/end_at_step are explicit. Install with the pack (ComfyUI Manager → search "CRT-Nodes", or clone https://github.com/plugcrypt/CRT-Nodes.git into custom_nodes and restart) - no models, no deps beyond the pack itself.

    CategoryCRT/Logic

    Inputs (2)

    NameTypeDefaultDescription
    desired_stepsINT6
    strength_percentFLOAT401–100

    Outputs (2)

    NameTypeDescription
    total_stepsINT
    start_stepINT