Nodes/NodeSimpleExecutor/NodeAutoSampler
ComfyUI Node

NodeAutoSampler

Read the checkpoint name, get the right steps/CFG/sampler back

By KERRY-YUAN·Created about a year ago·Updated about a year ago· 2
NodeAutoSampler
    • steps
    • cfg
    • sampler
    • text
    ckpt_name
    modeAuto
    if_includelight,turbo
    if_steps5
    if_cfg2.00
    if_samplerdpmpp_sde
    else_steps30
    else_cfg5.00
    else_samplerdpmpp_2m_sde
    user_steps20
    user_cfg3.50
    user_samplerdpmpp_2m_sde

    The most annoying part of ComfyUI is that every checkpoint wants its own sampling recipe. A distilled "turbo" or "lightning" model is happy at 4–8 steps and CFG ~2; a full model wants 20–30 steps and CFG 5+ (see the sampler/CFG tables in the KB's concepts essay for why). If you swap checkpoints a lot, you spend half your time editing three widgets on the KSampler. NodeAutoSampler is a small trick to stop doing that: it reads the checkpoint name, decides which family it belongs to, and hands you steps, cfg, and sampler as plain numbers you wire straight into the KSampler.

    Fair warning first: this is an obscure node from an obscure pack. KERRY-YUAN's ComfyUI_Simple_Executor ("NodeSimpleExecutor") has essentially no community footprint - search the reddit corpus and you get nothing. The README literally says "subject to occasional updates." It's a hobbyist utility, not an ecosystem staple, and it does exactly one thing. That's fine. Sometimes that's what you want.

    How it works

    You feed it a model name (ckpt_name - wire it from your CheckpointLoaderSimple's ckpt_name output) and pick a mode from Auto, If_include, Else, or User. Auto is the default and the one that earns the name:

    • If any of the keywords in if_include (default light,turbo) appears as a substring of the lowercased model name → use the if set (default if_steps 5, if_cfg 2.0, if_sampler dpmpp_sde).
    • Else if the name contains userconfig → use the user set (default 20 steps, CFG 3.5).
    • Otherwise → the else set (default 30 steps, CFG 5.0, dpmpp_2m_sde).

    The other three modes just force the corresponding set, ignoring the name. There's no secret sauce: it's an if/else over a string, written in a single function in NodeSimpleExecutor.py.

    The inputs that matter

    • ckpt_name (STRING) - the model name, i.e. a filename string.
    • mode (Auto / If_include / Else / User).
    • The three tuning sets: if_steps/if_cfg/if_sampler, else_steps/else_cfg/else_sampler, user_steps/user_cfg/user_sampler. The sampler dropdowns are pulled live from ComfyUI's own KSampler.SAMPLERS list, so you can't pick an invalid one.

    Outputs and wiring

    • steps (INT), cfg (FLOAT), sampler (STRING) - drag each onto the matching KSampler field. ComfyUI converts the node's typed outputs into the sampler widget inputs; the author's bundled example uses the older SetNode/primitive trick, but dragging straight onto the widgets works too.
    • text (STRING) - a steps;cfg;sampler summary. Send it to a text-display node so you can see which branch fired instead of guessing.

    Where people get burned

    • It doesn't output a scheduler. Half the modern "why does this look wrong" problem is scheduler choice (distilled models often want sgm_uniform, flow-matching models hate Karras). This node automates steps, CFG, and sampler only - you still set the scheduler by hand. Be aware you're automating a fraction of the recipe.
    • Substring matching is blunt. light matches lightning, sunlight, anything containing "light". Usually harmless - lightning checkpoints are distilled - but read your filenames.
    • The userconfig trigger is undocumented. It only appears in the source. If your checkpoint is named ...userconfig..., Auto jumps to the user set.
    • It keys off the filename string only. Name your checkpoints realistic-v10 and Auto will always hit the else branch, silently.

    Install

    ComfyUI Manager (search ComfyUI_Simple_Executor or NodeSimpleExecutor), or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/KERRY-YUAN/ComfyUI_Simple_Executor
    

    Restart ComfyUI. That's the whole install - dependencies are torch/numpy/Pillow, all already present, and there are no model downloads. It's the rare custom node that can't break your environment. Whether it earns a slot in your graph depends on how many speed-model checkpoints you rotate through; for a name like flux1-dev-...-light-8step, it does.

    Categorycustom

    Inputs (12)

    NameTypeDefaultDescription
    ckpt_nameSTRING
    modeCOMBOAuto4 options: Auto, If_include, Else, User
    if_includeoptSTRINGlight,turbo
    if_stepsoptINT51–1000
    if_cfgoptFLOAT2.000.1–100
    if_sampleroptCOMBOdpmpp_sde44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
    else_stepsoptINT301–1000
    else_cfgoptFLOAT5.000.1–100
    else_sampleroptCOMBOdpmpp_2m_sde44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
    user_stepsoptINT201–1000
    user_cfgoptFLOAT3.500.1–100
    user_sampleroptCOMBOdpmpp_2m_sde44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38

    Outputs (4)

    NameTypeDescription
    stepsINT
    cfgFLOAT
    samplerSTRING
    textSTRING