Nodes/ComfyUI-Static-Primitives/Collection Primitive (sampler)
ComfyUI Node

Collection Primitive (sampler)

A sampler dropdown you can actually reroute

By 80sVectorz·Created 3 years ago·Updated about a year ago· 11
Collection Primitive (sampler)
    • eulereuler_ancestralheunheunpp2dpm_2dpm_2_ancestrallmsdpm_fastdpm_adaptivedpmpp_2s_ancestraldpmpp_sdedpmpp_sde_gpudpmpp_2mdpmpp_2m_sdedpmpp_2m_sde_gpudpmpp_3m_sdedpmpp_3m_sde_gpuddpmlcmddimuni_pcuni_pc_bh2
    Input_sampler

    This one's a step up from the pack's plain STRING/INT/FLOAT primitives - it's a dropdown of sampler names, and the reason it exists is the same reroute problem the rest of the pack solves, just applied to a fussier case. A stock KSampler's sampler_name widget, once converted to input, is a combo type - it isn't a plain string, it's a socket typed to the exact list of valid sampler names. That combo type doesn't survive a Reroute node any better than a regular dynamic primitive does. This node gives you that exact combo type, pre-typed and fixed, so you can pick a sampler once and route it wherever it needs to go without ComfyUI blocking the connection.

    Why it's technically different from the four basic primitives

    The pack's README calls this a "collection primitive," and it's a genuinely separate mechanism from the String/Int/Float nodes - an extensible system where a pack (or you, if you read the collection-primitives docs linked from the main README) can register a custom dropdown of valid string values as its own typed socket. Samplers and schedulers are the two collections that ship out of the box. The output isn't a generic STRING - it's typed to match exactly what a stock sampler_name input expects, so it wires straight into anything that wants a sampler name: a KSampler's converted sampler_name widget, SamplerCustom, KSamplerSelect, and similar advanced-sampling nodes.

    Inputs and outputs

    One field: Input_sampler, a dropdown with 22 choices - euler, euler_ancestral, heun, heunpp2, dpm_2, dpm_2_ancestral, lms, dpm_fast, dpm_adaptive, dpmpp_2s_ancestral, dpmpp_sde, dpmpp_sde_gpu, dpmpp_2m, dpmpp_2m_sde, dpmpp_2m_sde_gpu, dpmpp_3m_sde, dpmpp_3m_sde_gpu, ddpm, lcm, ddim, uni_pc, uni_pc_bh2. Whatever you pick is passed through as the single output, typed to that same sampler-name list, ready to feed anything downstream that expects a sampler.

    The thing to know before you rely on this list

    That 22-entry list is ComfyUI's classic sampler set - the one that's been stable since the DPM++ family settled in. It does not include newer additions like res_multistep or er_sde, which is worth knowing because those two specifically show up in current recommendations for flow-matching models: res_multistep for Z-Image Base, er_sde for Anima. If you're building a workflow around one of the newer architectures and the recommended sampler isn't in this dropdown, don't fight the node - leave the target's sampler_name widget as a widget (don't convert it to input) and pick the sampler directly there instead. For SD 1.5, SDXL, and Flux-era workflows, this covers you completely; it's specifically the newest step-count-collapsed models where the list runs short.

    Installing it

    ComfyUI Manager - search ComfyUI-Static-Primitives, install, restart.

    Manually:

    cd ComfyUI/custom_nodes && git clone https://github.com/80sVectorz/ComfyUI-Static-Primitives.git
    

    Restart ComfyUI. No dependencies, no models - it's pure Python. Find it, and the rest of the pack, under the primitives category.

    Where people get tripped up

    The sampler you want isn't in the list. See above - this is a fixed set, not a live pull from whatever samplers happen to be registered in your ComfyUI install. Newer or third-party-pack-provided samplers (from something like RES4LYF, for instance) won't appear here regardless of whether they're installed elsewhere.

    Trying to wire its output into a plain STRING input. It won't type-check. The output here is a combo/enum type matching the sampler list, not a generic string - even though the value looks like plain text, ComfyUI treats it as a distinct type. If you genuinely need the sampler name as a raw string (for a display or filename node, say), you'll need a conversion step; this node alone won't give you one.

    Confusing this with the scheduler version. They're separate nodes - sampler and scheduler are independent choices in ComfyUI's sampling stack, and this pack ships one collection primitive for each. Pairing them is your job; the node itself only handles one half.

    Categoryprimitives

    Inputs (1)

    NameTypeDefaultDescription
    Input_samplerCOMBO22 options: euler, euler_ancestral, heun, heunpp2, dpm_2, dpm_2_ancestral, +16

    Outputs (1)

    NameTypeDescription
    eulereuler_ancestralheunheunpp2dpm_2dpm_2_ancestrallmsdpm_fastdpm_adaptivedpmpp_2s_ancestraldpmpp_sdedpmpp_sde_gpudpmpp_2mdpmpp_2m_sdedpmpp_2m_sde_gpudpmpp_3m_sdedpmpp_3m_sde_gpuddpmlcmddimuni_pcuni_pc_bh2euler,euler_ancestral,heun,heunpp2,dpm_2,dpm_2_ancestral,lms,dpm_fast,dpm_adaptive,dpmpp_2s_ancestral,dpmpp_sde,dpmpp_sde_gpu,dpmpp_2m,dpmpp_2m_sde,dpmpp_2m_sde_gpu,dpmpp_3m_sde,dpmpp_3m_sde_gpu,ddpm,lcm,ddim,uni_pc,uni_pc_bh2