D2 Preset Selector
One dropdown that swaps whole batches of settings (steps, cfg, whatever)
- _update
If you juggle several checkpoints that each want different sampler settings, D2 Preset Selector is the node that quietly saves your sanity. It's the "slightly convenient" idea this pack is built on, and it does one thing well: you define a table of parameter sets as plain text, pick a row from a dropdown, and the node spits out every value in that row as its own output.
The killer use case is checkpoint lineage. Pony-lineage models want low CFG and quality tags handled a certain way, Illustrious-lineage models want more steps and a higher CFG. Rather than rebuilding your workflow every time you swap checkpoints, you define one preset per model and let the dropdown do the switching. Wire the preset_name input from whatever is choosing your checkpoint and even that becomes automatic.
How it works
The whole thing is text. preset_text has three sections, semicolon-separated:
cfg;steps
FLOAT;INT
Anima;2;15
Illustrious;5;20
Line 1 is the output names, line 2 is the output types (INT, FLOAT, STRING, BOOLEAN), and every line after that is one preset: a title plus one value per column. Pick Anima and you get cfg = 2 (a FLOAT) and steps = 15 (an INT) out. The titles on line 3 onward become the dropdown choices, and clicking _update rebuilds both the dropdown and the output slots after you edit the text.
Two inputs matter beyond that. preset is the dropdown itself. preset_name is a force-input string - connect a primitive or another node and it overrides the dropdown (empty string counts as "not set"). That's how you tie preset selection to the checkpoint you loaded instead of picking by hand.
The outputs aren't fixed; they're generated from line 1 of your preset_text. So "what does it output" is really "whatever columns you defined." Values are type-cast, and if you tell it a column is INT and feed it abc, it fails with an error that names the preset, the column, and the bad value. That's annoying in the moment and very helpful when you have forty rows to debug.
Installing
It's part of the D2-nodes-ComfyUI pack. Install the pack, not the node:
- ComfyUI Manager → search "D2-nodes-ComfyUI" → Install → restart.
- Or:
cd ComfyUI/custom_nodes && git clone https://github.com/da2el-ai/D2-nodes-ComfyUIand restart.
Dependencies are just piexif and charset-normalizer - nothing heavy, no model downloads. One real gotcha: the pack moved to the ComfyUI V3 schema in v32.0.0. On an older ComfyUI, grab a pre-32.0.0 release. Also delete the old standalone d2 packs (ComfyUI-d2-size-selector, ComfyUI-d2-steps, ComfyUI-d2-xyplot-utils) if you have them - they merged into this pack.
Where people get burned
The ; separator is your delimiter, so you can't put a literal ; inside a STRING value. Keep values simple. And you can't wire a primitive node into the preset dropdown - ComfyUI won't render the choices for a combo that's driven externally. That's exactly what preset_name exists for, so use it.
Also note the output count only updates after you press _update. Edit preset_text, hit the button, then wire things up. Easy to forget on your first try.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| preset | COMBO | 0 options: | |
| preset_text | STRING | cfg;steps FLOAT;INT Anima;2;15 Illustrious;5;20 | — |
| preset_nameopt | STRING | — | |
| _updateopt | D2_BUTTON | — |
Outputs (0)
No outputs