Nodes/RES4LYF-tester-loop/RES4LYF Sampler Loop
ComfyUI Node

RES4LYF Sampler Loop

Sweep 100+ RES4LYF samplers without ever touching the dropdown

By KY-2000·Created about a year ago·Updated about a year ago· 9
RES4LYF Sampler Loop
    • sampler_name
    • current_index
    • total_combinations
    • current_combination
    • sampler_mode
    • label
    mode
    seed0
    resetfalse
    skip_samplers
    loop_sampler_modefalse
    sampler_mode_method
    skip_sampler_modes

    The problem this node solves is the one everyone hits the moment they install RES4LYF: you now have well over a hundred samplers, and none of them are in ComfyUI's stock dropdown. The honest way to pick between them is to run the same prompt and seed through a bunch and look at the results side by side. That's the "change → queue → rename → repeat" grind, and RES4LYFSamplerLoop is a small machine built to automate exactly that.

    It's the flagship node of KY-2000's RES4LYF-tester-loop pack, a companion to ClownsharkBatwing/RES4LYF - the sampler pack that, for flow-matching models like Flux, Z-Image and Anima, has basically replaced DPM++ 2M Karras as the place sampler tuning happens. The loop nodes don't add samplers; they let you iterate over the ones you already have, one per queue run, so every image in a batch comes out with a different solver. The author's own sample workflow wires this straight into RES4LYF's ClownsharKSampler_Beta node, with AddLabel captioning each output.

    How it works

    On every execution the node advances a counter and picks the next sampler from your actual RES4LYF install - it reads the enum list directly from RES4LYF/beta/rk_coefficients_beta.py at import time, so you get exactly the solvers you really have, including new ones added upstream. If that file isn't found (RES4LYF missing or installed under a different folder name), it falls back to a built-in list of 100+ samplers and prints a [RES4LYF Tester Loop] Using FALLBACK_SAMPLERS line in the console, which is your cue that something's off.

    Three modes control selection: sequential walks the list in order, random picks via a seeded RNG, and ping_pong bounces back and forth through the range. seed makes random reproducible; reset (true) pushes the counter back to the start.

    The inputs that matter

    • mode - sequential / random / ping_pong. The one you'll actually change.
    • seed - only relevant in random mode.
    • reset - flip it once to restart the sweep.
    • skip_samplers - comma- or newline-separated names to exclude, e.g. none, exponential/res_16s.
    • loop_sampler_mode + sampler_mode_method + skip_sampler_modes - optionally cycle RES4LYF's three sampler modes (unsample, standard, resample) on top.

    Outputs: sampler_name (the enum, wired into ClownsharKSampler_Beta.sampler_name), current_index, total_combinations, current_combination, sampler_mode, and a label like multistep/res_2m | standard you can push into AddLabel or a filename.

    Install

    Two things, in order: RES4LYF first, then this pack, both in ComfyUI/custom_nodes/.

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

    Restart ComfyUI. ComfyUI Manager also finds both by title. No pip dependencies, no model downloads - the whole pack is stdlib Python.

    Where people get burned

    The sampler enum literally starts with "none", a real option that does nothing useful in a sweep - add it to skip_samplers. All instances of this node class share one counter, so two Sampler Loops in one workflow advance together; use one per sweep or you'll be confused. And remember the sweep will happily hand you Karras/exponential pairings that are known to fail on flow-matching models - that's fine, it's a sweep, just don't mistake a dead combo for a verdict on the sampler itself.

    CategoryRES4LYF/Loop

    Inputs (7)

    NameTypeDefaultDescription
    modeCOMBO3 options: sequential, random, ping_pong
    seedINT00–18446744073709550000
    resetBOOLEANfalse
    skip_samplersoptSTRING
    loop_sampler_modeoptBOOLEANfalse
    sampler_mode_methodoptCOMBO3 options: sequential, random, ping_pong
    skip_sampler_modesoptSTRING

    Outputs (6)

    NameTypeDescription
    sampler_namenone,multistep/res_2m,multistep/res_3m,multistep/dpmpp_2m,multistep/dpmpp_3m,multistep/abnorsett_2m,multistep/abnorsett_3m,multistep/abnorsett_4m,multistep/deis_2m,multistep/deis_3m,multistep/deis_4m,exponential/res_2s_rkmk2e,exponential/res_2s,exponential/res_2s_stable,exponential/res_3s,exponential/res_3s_non-monotonic,exponential/res_3s_alt,exponential/res_3s_cox_matthews,exponential/res_3s_lie,exponential/res_3s_sunstar,exponential/res_3s_strehmel_weiner,exponential/res_4s_krogstad,exponential/res_4s_krogstad_alt,exponential/res_4s_strehmel_weiner,exponential/res_4s_strehmel_weiner_alt,exponential/res_4s_cox_matthews,exponential/res_4s_cfree4,exponential/res_4s_friedli,exponential/res_4s_minchev,exponential/res_4s_munthe-kaas,exponential/res_5s,exponential/res_5s_hochbruck-ostermann,exponential/res_6s,exponential/res_8s,exponential/res_8s_alt,exponential/res_10s,exponential/res_15s,exponential/res_16s,exponential/etdrk2_2s,exponential/etdrk3_a_3s,exponential/etdrk3_b_3s,exponential/etdrk4_4s,exponential/etdrk4_4s_alt,exponential/dpmpp_2s,exponential/dpmpp_sde_2s,exponential/dpmpp_3s,exponential/lawson2a_2s,exponential/lawson2b_2s,exponential/lawson4_4s,exponential/lawson41-gen_4s,exponential/lawson41-gen-mod_4s,exponential/ddim,hybrid/pec423_2h2s,hybrid/pec433_2h3s,hybrid/abnorsett2_1h2s,hybrid/abnorsett3_2h2s,hybrid/abnorsett4_3h2s,hybrid/lawson42-gen-mod_1h4s,hybrid/lawson43-gen-mod_2h4s,hybrid/lawson44-gen-mod_3h4s,hybrid/lawson45-gen-mod_4h4s,linear/ralston_2s,linear/ralston_3s,linear/ralston_4s,linear/midpoint_2s,linear/heun_2s,linear/heun_3s,linear/houwen-wray_3s,linear/kutta_3s,linear/ssprk3_3s,linear/ssprk4_4s,linear/rk38_4s,linear/rk4_4s,linear/rk5_7s,linear/rk6_7s,linear/bogacki-shampine_4s,linear/bogacki-shampine_7s,linear/dormand-prince_6s,linear/dormand-prince_13s,linear/tsi_7s,linear/euler,diag_implicit/irk_exp_diag_2s,diag_implicit/kraaijevanger_spijker_2s,diag_implicit/qin_zhang_2s,diag_implicit/pareschi_russo_2s,diag_implicit/pareschi_russo_alt_2s,diag_implicit/crouzeix_2s,diag_implicit/crouzeix_3s,diag_implicit/crouzeix_3s_alt,fully_implicit/gauss-legendre_2s,fully_implicit/gauss-legendre_3s,fully_implicit/gauss-legendre_4s,fully_implicit/gauss-legendre_4s_alternating_a,fully_implicit/gauss-legendre_4s_ascending_a,fully_implicit/gauss-legendre_4s_alt,fully_implicit/gauss-legendre_5s,fully_implicit/gauss-legendre_5s_ascending,fully_implicit/radau_ia_2s,fully_implicit/radau_ia_3s,fully_implicit/radau_iia_2s,fully_implicit/radau_iia_3s,fully_implicit/radau_iia_3s_alt,fully_implicit/radau_iia_5s,fully_implicit/radau_iia_7s,fully_implicit/radau_iia_9s,fully_implicit/radau_iia_11s,fully_implicit/lobatto_iiia_2s,fully_implicit/lobatto_iiia_3s,fully_implicit/lobatto_iiia_4s,fully_implicit/lobatto_iiib_2s,fully_implicit/lobatto_iiib_3s,fully_implicit/lobatto_iiib_4s,fully_implicit/lobatto_iiic_2s,fully_implicit/lobatto_iiic_3s,fully_implicit/lobatto_iiic_4s,fully_implicit/lobatto_iiic_star_2s,fully_implicit/lobatto_iiic_star_3s,fully_implicit/lobatto_iiid_2s,fully_implicit/lobatto_iiid_3s
    current_indexINT
    total_combinationsINT
    current_combinationSTRING
    sampler_modeunsample,standard,resample
    labelSTRING