Sampler Selector
Pick a solver once, hand it out as a socket and as text
- sampler_name
- sampler_name_str
ComfyUI's sampler dropdown is one of the few places everyone still operates by hand. Forty-odd names, a couple of which you actually use, and no way to say "this workflow runs dpmpp_2m_sde_gpu, tell every node that needs to know from one place." Sampler Selector is the boring little node that fixes that - and the one that makes sampler sweeps possible, which is the part people actually want it for.
What it is, mechanically
A dropdown plus two outputs, and the implementation is two lines:
def get_sampler(self, sampler_name):
return sampler_name, sampler_name
The same string goes out of both sockets. The difference is the declared type. sampler_name is declared as ComfyUI's sampler enum, so it type-matches a converted sampler_name widget on a KSampler. sampler_name_str is declared as STRING, so it can go into any text input - a prompt template, a label, a filename builder, or the pack's own Sampler Selector From String node.
Two outputs for one value looks redundant until you hit the wall the author hit: a socket carrying ComfyUI's sampler type will only connect to a widget that accepts that same type. A lot of third-party nodes take their sampler as plain text. The string output is the compatibility hatch.
The dropdown is the whole sampler list
The menu is built at load time from comfy.samplers.KSampler.SAMPLERS, so it is exactly the set your install knows about - 44 names in the build I checked, from euler and heun through dpmpp_3m_sde_gpu, res_multistep, sa_solver, seeds_3 and uni_pc_bh2. This matters in both directions. Install a pack that registers its own solvers and they can appear here too; it's how people end up running a RES4LYF solver from what looks like a stock workflow. And if a solver you expect is missing, the problem is your ComfyUI version or the missing third-party pack, not this node.
What to actually pick
Short version, from a knowledge base that has been arguing about this for two years:
- SD 1.5 and SDXL, including Illustrious, NoobAI and Pony finetunes:
dpmpp_2mon Karras is the historical safe pair, 20-30 steps. These are all DDPM-style models, so the old advice still holds for them. - Flow-matching models - Flux, Z-Image, Klein, Anima:
euler,euler_ancestralordpmpp_sde, paired with a conservative schedule. Karras and exponential are not merely suboptimal there, they fail. - Distilled checkpoints (Lightning, Turbo, Hyper, DMD2):
euler. The step count comes from the variant, and the sampler does not.
One thing worth knowing before you sweep: converging vs ancestral is a different axis from which algorithm. Euler, DPM++ 2M, DDIM and UniPC settle; _ancestral variants and DPM++ SDE inject fresh noise each step and never fully settle. If you're sweeping CFG or steps, hold a converging sampler steady, or every cell changes for two reasons at once. If the sampler is the axis, ancestral is fine - that's the one sweep where its variance is the point.
Wiring it up
Right-click the sampler_name widget on your KSampler, choose Convert widget to input, and wire the typed output in. That's it - the sampler is now defined in one node.
For a sweep, pair it with an iterator (a native loop, or the pack's own generator nodes, which string several picks together into a comma-separated list). And use the string output to label the results: the value that ends up in your grid or filename is the same value that drove the sampler, so there's no way for the label to lie about what produced the image.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/DemonAlone/DemonAlone-nodes-ComfyUI
cd DemonAlone-nodes-ComfyUI
pip install -r requirements.txt
Or search DemonAlone-nodes-ComfyUI in ComfyUI Manager and restart. The only pip dependency is piexif, which this node doesn't use - no models, no web/ extension, nothing to configure. You'll find it under utils as Sampler Selector.
Things that go wrong
No nodes from the pack show up at all. The module-level import piexif in image_utilites.py means a skipped pip install -r requirements.txt breaks the entire pack, and the error message blames a library you've never heard of. That's the first thing to check, every time.
A typo'd sampler name falls back to Euler, quietly-ish. If you route the string output into the pack's Sampler Selector From String node, invalid text doesn't error - it prints a warning to the console and returns euler. Good for stability, slightly baffling if you're not reading the log.
The typed output won't connect to a third-party sampler field. The enum types don't match; those nodes often declare their own list. Feed the string output into whatever text input they expose instead.
The dropdown looks wrong. Longer or shorter than the 44 names here means it's your install, not the node - refresh the page after installing anything that adds samplers.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| sampler_name | COMBO | 44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38 |
Outputs (2)
| 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 | — |
| sampler_name_str | STRING | — |