Nodes/ComfyUI-JNodes/Sampler Selector + String
ComfyUI Node

Sampler Selector + String

Output a sampler as both a real sampler and a string

By JaredTherriault·Created 3 years ago·Updated about a month ago· 91
Sampler Selector + String
    • sampler_name
    • STRING
    sampler_name
    mode
    seed0

    Pick a sampler and this node gives you two things at once: the actual sampler name in the type your KSampler expects, and the same name as a plain string you can drop into a filename, log, or metadata field. That second output is the whole reason it exists. If you've ever run a batch across different samplers and then couldn't tell which image used which, this fixes it - the sampler that made the image can be baked right into its name.

    It's one of JNodes' "selector with string" nodes (there are siblings for checkpoints, VAEs, schedulers, booleans, and image formats), all following the same pattern from Jared Therriault's suite: return a usable value and a string, optionally randomized by seed.

    How it works

    You choose a sampler from the list - 44 of them, from plain euler up through the newer res_multistep, gradient_estimation, seeds_2/seeds_3, sa_solver, and the _cfg_pp variants. The mode decides how the pick happens: select uses exactly what you chose, seed picks one based on the seed (random-feeling), and index steps through the list deterministically. Out come two pins: the typed sampler name for your sampler node, and the string form for everything else.

    The inputs and outputs

    • sampler_name (enum, 44 choices) - the sampler you want (used directly in select mode).
    • mode (select / seed / index) - fixed, seed-random, or stepped selection.
    • seed (INT) - drives the choice in seed/index modes.
    • sampler_name output (the typed sampler enum) - wire this into a KSampler or SamplerCustom's sampler input.
    • STRING output - the sampler name as text, for filenames, metadata, or a show-text node.

    How to install it

    Via ComfyUI Manager: Install Custom Nodes, search "JNodes", install, restart. Or by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/JaredTherriault/ComfyUI-JNodes
    pip install -r ComfyUI-JNodes/requirements.txt
    

    then restart ComfyUI. No model downloads - the sampler list comes from your ComfyUI install, so it matches whatever samplers your version ships.

    Common issues & troubleshooting

    seed and index modes are for exploration, not production. These modes deliberately hand you a different sampler as the seed changes, which is fantastic for a sampler sweep or randomized experimentation - and chaos if you wanted consistency. If your output quality is jumping around between runs, check that mode isn't set to seed. For a locked-in pipeline, use select.

    Random selection can land on a slow or quirky sampler. The list includes things like dpm_adaptive (which ignores your step count and runs until it converges) and various _sde variants that behave differently. In seed/index mode you might roll one of those and see your render time or look change unexpectedly. That's the sampler, not the node.

    Use the two outputs for their two jobs. The typed output goes to your sampler; the STRING goes to metadata or a filename. Don't try to feed the string into the sampler's sampler input or the typed value into a text field - cross-wiring them is the usual "why won't this connect" head-scratcher.

    The choices track your ComfyUI version. Newer samplers appear as your core ComfyUI updates. If a sampler you read about online isn't in the list, your install is likely older than the one that added it - update ComfyUI rather than blaming JNodes.

    Categorysd

    Inputs (3)

    NameTypeDefaultDescription
    sampler_nameCOMBO44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
    modeCOMBO3 options: select, seed, index
    seedINT0

    Outputs (2)

    NameTypeDescription
    sampler_nameeuler,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
    STRINGSTRING