🗂️Dict → Sampler
Carry your sampler selection in the bus
- dict
- value
Stock ComfyUI lets you pick a sampler from a dropdown on the KSampler and never think about it again. The advanced corner of the ecosystem treats the sampler as an object - a SAMPLER that a node creates and passes around, so you can swap sampling strategies without editing a widget. DictExtractSampler ("🗂️Dict → Sampler"), under Extract/Advanced, is how that object rides in the dict bus.
If you're building custom sampling stacks - the kind where a sampler object, a guider, and a noise object get assembled before they meet the sampler - this node is the tidy way to carry the sampler selection alongside its siblings. Store it up top under a key like sampler_main, extract it where the sampling node consumes it. Swapping samplers becomes a change in one keyed slot rather than a hunt through the middle of the graph.
What you set
- dict (required) - the dictionary to read from (non-empty).
- key - the slot where the sampler lives.
- cleanup_key (on by default) - normalizes the key.
Output: value as the Sampler type, wired into a sampler node that accepts a SAMPLER input.
The honest framing
Same story as its Advanced-category neighbors: if your KSampler has a dropdown, you are not the audience, and that's fine. This node exists to complete the type coverage for people whose workflows are built from custom sampler packs. There, the payoff is real - a modular pipeline where your sampler, guider, and noise choices are three keyed dict entries reads like a config file, and "try a different sampler" is a one-edit experiment instead of a rewiring job.
Standard pack behavior: the extractor type-checks what it returns, and a missing key raises "No such key in Dict" rather than silently returning nothing. It carries the sampler object - it doesn't create one, so it only matters if something upstream has already made the SAMPLER you want to pass around.
Install
Same for every node in this pack - small, one lightweight dependency (frozendict), no model downloads. ComfyUI Manager: search "Dict Tools". Or:
cd ComfyUI/custom_nodes
git clone https://github.com/Lex-DRL/ComfyUI-DictTools
Restart ComfyUI. Needs 0.18.0+ (newer extension API) - if the nodes don't appear after install, update ComfyUI before anything else.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| dict | DICT | A Dictionary to work with. | |
| key | STRING | Key (name) of the item extracted from the dict. | |
| cleanup_key | BOOLEAN | true | Automatically remove leading/trailing spaces and extra newlines from the key. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| value | SAMPLER | The actual Sampler-type item extracted from the Dict. |