JK String Sampler Adapter
Turn a plain string into a proper sampler-type socket
- sampler
ComfyUI's sampler dropdown - euler, dpmpp_2m, dpmpp_2m_sde, and about thirty others - isn't just a list of strings on the wire; it's a typed enum, and nodes that expect a sampler input check for that exact type, not just any text that happens to match a valid sampler name. This node bridges that gap: it takes a sampler_str (a plain STRING) and outputs it re-typed as the proper sampler enum, so a value you built or selected dynamically - from a switch node, a text widget, a config string - can be plugged straight into a KSampler or any other node with a sampler input, instead of getting rejected for a type mismatch.
The inputs and outputs that matter
One input: sampler_str (STRING) - the sampler name as plain text. It has to be a value ComfyUI actually recognizes as a valid sampler name (euler, dpmpp_2m_sde_gpu, res_multistep, and so on - the full list matches ComfyUI's standard set of roughly three dozen samplers). One output: sampler, typed against that same full sampler enum, ready to plug directly into anything expecting one.
There's no validation widget here and no dropdown to pick from on this node itself - you're expected to already know (or generate) a correct sampler name as text. If you're not sure of the exact string a given sampler expects, check it against a stock KSampler's dropdown first.
When you'd reach for this
Mostly relevant if you're building sampler choice dynamically rather than picking it directly from a widget - for example, driving it from a text file, a batch-config string, or a switch node that outputs different sampler names depending on some upstream condition. If you're just picking a sampler from a normal dropdown widget on a KSampler, you don't need this node at all; it only matters when the value is arriving as a loosely-typed string connection instead. Its natural sibling is JKInspireSchedulerAdapter, which solves the same type-mismatch problem for scheduler names feeding into Inspire Pack nodes specifically.
Installing it
Part of kostenickj/jk-comfyui-helpers - already present on comfy.icu, or cd ComfyUI/custom_nodes && git clone https://github.com/kostenickj/jk-comfyui-helpers.git and restart for a self-hosted install. This node's own logic needs nothing extra - no model, no dependency beyond the pack itself. As with the rest of this pack, it's a small personal toolkit with little to no public discussion around it, so the node's behavior (and double-checking against a stock sampler dropdown when in doubt) is your best guide.
Common issues
- Type-mismatch error persists downstream. Make sure you're wiring this node's output, not the original string, into the receiving node - the adapter only helps past itself.
- "Invalid sampler" or similar failure. The string you fed in doesn't match a recognized sampler name exactly - check spelling and case against a stock KSampler's dropdown list; a typo or an outdated sampler name (ComfyUI occasionally adds or renames samplers) will fail silently or loudly depending on where it's caught.
- Not sure you need this at all. If your sampler choice comes straight from a normal dropdown widget with no intermediate string step, skip this node entirely - it's only useful when the value is genuinely arriving as a separate STRING connection.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| sampler_str | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| sampler | euler,euler_cfg_pp,euler_ancestral,euler_ancestral_cfg_pp,heun,heunpp2,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_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,ddim,uni_pc,uni_pc_bh2 | — |