ComfyUI Node

All Parameters Loop

Steps, CFG, shift, sampler, scheduler at once

By KY-2000·Created about a year ago·Updated about a year ago· 8
All Parameters Loop
    • steps
    • cfg
    • shift
    • sampler
    • scheduler
    • current_index
    • total_combinations
    • current_combination
    mode
    steps_start20
    steps_end50
    steps_interval10
    cfg_start1.0
    cfg_end8.0
    cfg_interval1.0
    shift_start1.0
    shift_end3.0
    shift_interval0.5
    seed0
    resetfalse
    skip_samplers
    skip_schedulers

    This is the node the pack's name promises and the others only gesture at. All Parameters Loop cycles through everything at once - steps, CFG, shift, sampler, and scheduler - and hands each combination to your KSampler one run at a time. The example workflow bundled with the pack shows the intended shape: its five value outputs plug straight into a KSampler's steps, cfg, sampler, and scheduler inputs, and the loop node's current_combination string goes to a text preview so you can see what each run is doing.

    If you're tuning a new model - especially a WanVideo setup, where this node's shift output actually lands in the WanVideo sampler - it's a genuine timesaver. Set your ranges, queue N times, and get a labeled sweep instead of hand-editing five widgets between every run.

    The mechanism, briefly

    One internal counter per mode, and the node advances it only when it sees a new execution (it dedupes via a timestamp-plus-thread ID). So: one queue run = one combination, next run = next combination. Same rule as every node in this family - "loop" means "roll forward on each execution," not "iterate internally."

    Combinations are enumerated in a fixed order: steps, then CFG, then shift, then sampler, then scheduler. So the last range you set changes fastest. Sequential mode walks that product in order; random mode picks an index using seed + step; ping_pong bounces back and forth through the whole product.

    Inputs that matter

    The three ranges use _start / _end / _interval naming, which is just the pack's way of saying "from, to, by":

    • steps_start / steps_end / steps_interval - integers, defaults 20/50/10. Steps is always the integer slider.
    • cfg_start / cfg_end / cfg_interval - floats, defaults 1/8/1. CFG behavior varies hard by model family - Wan, for instance, wants CFG 1.0 with speed LoRAs and 3.5+ without (the KB's Wan knowledge doc spells this out), so range-sweeping CFG is where this node earns its keep.
    • shift_start / shift_end / shift_interval - floats, defaults 1/3/0.5. shift is the flow/sigma shift parameter the WanVideo samplers use (lightx2v workflows typically run shift ~8). On SD/SDXL graphs it has no matching input - the pack's own example just leaves it unplugged.

    Plus the usual mode, seed, reset, and the skip_samplers / skip_schedulers comma lists. Floats are rounded to two decimals internally to dodge floating-point drift, which is a nice touch you don't notice until you'd otherwise be chasing off-by-one bugs.

    Outputs: steps, cfg, shift, sampler (a string, stock-KSampler-compatible), scheduler (a string), then current_index, total_combinations, and current_combination.

    Do the math before you queue

    total_combinations is the product of all five ranges. Three step values × 8 CFG values × 5 shift values × 44 samplers × 9 schedulers = 47,520 runs. On video scales that's a month of GPU. This node is a trap if you leave the defaults wide and just hit queue.

    Trim with the skip lists and narrow ranges. My move: fix sampler and scheduler first (skip everything but the two or three you believe in), sweep steps/CFG/shift, then lock those and let the sampler loop go. The reset boolean (BOOLEAN, default false) zeroes the counter whenever you want to restart a clean sweep.

    Install

    No dependencies, no models - this whole pack is pure Python over ComfyUI's own sampler/scheduler lists. ComfyUI Manager, search comfyui-ksampler-tester-loop (or "Sampler Scheduler Loop"), install, restart. Manual route:

    cd ComfyUI/custom_nodes
    git clone https://github.com/KY-2000/comfyui-ksampler-tester-loop
    

    then restart ComfyUI. Check the console if something's off - the node prints warnings for bad skip-list names and logs every selection, which is surprisingly useful when you're staring at run #200 and can't remember what it's testing.

    One honest caveat: with all those dials, a genuinely blind grid search is a bad idea - but as a structured sweep you control, this is the most useful node in the pack.

    CategorySamplers/Loop

    Inputs (14)

    NameTypeDefaultDescription
    modeCOMBO3 options: sequential, random, ping_pong
    steps_startINT201–1000
    steps_endINT501–1000
    steps_intervalINT101–100
    cfg_startFLOAT1.00–30
    cfg_endFLOAT8.00–30
    cfg_intervalFLOAT1.00.1–10
    shift_startFLOAT1.00–10
    shift_endFLOAT3.00–10
    shift_intervalFLOAT0.50.1–5
    seedINT00–18446744073709550000
    resetBOOLEANfalse
    skip_samplersoptSTRING
    skip_schedulersoptSTRING

    Outputs (8)

    NameTypeDescription
    stepsINT
    cfgFLOAT
    shiftFLOAT
    samplereuler,euler_cfg_pp,euler_ancestral,euler_ancestral_cfg_pp,heun,heunpp2,exp_heun_2_x0,exp_heun_2_x0_sde,dpm_2,dpm_2_ancestral,lms,dpm_fast,dpm_adaptive,dpmpp_2s_ancestral,dpmpp_2s_ancestral_cfg_pp,dpmpp_sde,dpmpp_sde_gpu,dpmpp_2m,dpmpp_2m_cfg_pp,dpmpp_2m_sde,dpmpp_2m_sde_gpu,dpmpp_2m_sde_heun,dpmpp_2m_sde_heun_gpu,dpmpp_3m_sde,dpmpp_3m_sde_gpu,ddpm,lcm,ipndm,ipndm_v,deis,res_multistep,res_multistep_cfg_pp,res_multistep_ancestral,res_multistep_ancestral_cfg_pp,gradient_estimation,gradient_estimation_cfg_pp,er_sde,seeds_2,seeds_3,sa_solver,sa_solver_pece,ddim,uni_pc,uni_pc_bh2
    schedulersimple,sgm_uniform,karras,exponential,ddim_uniform,beta,normal,linear_quadratic,kl_optimal
    current_indexINT
    total_combinationsINT
    current_combinationSTRING