Sampler Adapter
Turn the sampler dropdown into a wire you can route
- sampler_name
Every sampler node in ComfyUI - KSampler, KSamplerAdvanced, the whole sampler family - has a sampler_name dropdown as a widget you change by hand. That's fine until you want the sampler to be decided by the workflow itself: a preset node feeding different samplers in, a batch that tries euler_ancestral then dpmpp_2m automatically, or a saved workflow where the sampler comes from embedded metadata. XJSamplerAdapter exists for exactly that. It's one dropdown and one output, and the output is a value you can wire into any sampler_name input instead of leaving the widget in charge.
Let's be honest about what this is: a passthrough. The node has zero logic. Under the hood it's the same trick as the "String Pass" utilities - it exposes ComfyUI's own list of samplers (comfy.samplers.KSampler.SAMPLERS) as a combo box, then returns the string you picked. The clever bit is the defaultInput: False flag, which lets you feed a value into it from upstream if you want, making it a bridge between string logic and the sampler input. You could do the same thing by hardcoding the string elsewhere, but this keeps the list in sync with whatever samplers your ComfyUI build actually ships - 44 of them at last count, including the cfg_pp variants and the SDE family.
The inputs and outputs are almost embarrassingly short:
sampler- the dropdown. Everything fromeulerandeuler_ancestraltodpmpp_2m_sde,sa_solver,uni_pcand the_cfg_ppcrowd.- Output:
sampler_name, a plain value you plug into KSampler / KSamplerAdvanced / SamplerCustomAdvanced'ssampler_namesocket.
Where you'd actually reach for it: wiring it to a seed or preset switcher so sampler choice rides on the same logic as the rest of a batch. It's the kind of node that looks pointless until you build a workflow where someone says "change the sampler between runs" and you realize the widget is the thing you can't script. A text-to-string node would work too; this one just comes with the canonical, up-to-date list built in.
How to install: the pack is alexjx/ComfyUI-XJNodes. Easiest is ComfyUI Manager → Custom Nodes Manager → search "ComfyUI-XJNodes" → Install, then restart. Manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/alexjx/ComfyUI-XJNodes
Restart ComfyUI and you'll find this under XJNodes/util. No model downloads, no extra pip packages - requirements.txt is empty, and the node only touches ComfyUI's built-in sampler registry.
One honest caveat: this is a personal-use pack with a tiny footprint - you won't find tutorials for it, and the author says as much in the README. It works, but it's not doing anything you couldn't improvise. If you're just setting a sampler once and never touching it, the dropdown already on KSampler is the right answer. The adapter earns its keep the moment you need sampler choice to move through the graph.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| sampler | COMBO | 44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| sampler_name | euler,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 | — |