Prompt Preset Selector (Multi-File, Wildcard)
Three preset files at once, without a merge step
- text
- preset_list
- selected_info
Here's the scenario this node exists for: your camera angles live in a plain .txt, your lighting setups are in a YAML file with a nested structure, and your character list is a third YAML in a completely different format. You want to pull from all of them at once, but merging three differently-shaped files by hand is exactly the kind of busywork you installed ComfyUI to avoid. The Multi-File version of Prompt Preset Selector skips the merge: up to three preset files, each with its own on/off toggle, loaded into one combined pool.
It's a text-plumbing node from the same pack as the single-file and Folder selectors - no models, no keys, nothing heavy. It's the middle child of the family, and for most people it's actually the sweet spot: all the power of the Folder node without having to babysit a directory tree.
How it works
Three independent file slots, each with three fields: enabled{n} (turn it off without clearing its settings), preset_file{n} (a dropdown), and absolute_path{n} (which wins over that slot's dropdown if you fill it in). Every line from every active slot gets prefixed with its file name:
colors.txt: red
colors.txt: blue
camera_angles.yaml: camera_angles:close_up: front view, low-angle shot
The combined list is numbered slot 1 first, then 2, then 3, in each file's original order - so preset_index counts across the whole pool. The wildcard support is full, and it's smarter than the single-file version: {__key__|__key__} searches keys across all loaded files, so a key defined in heroes.yaml can reference one in sidekicks.yaml. If the same top-level key exists in two files, the later-loaded file wins.
The inputs that matter
enabled1/enabled2/enabled3- flip a file off to A/B test combinations without retyping paths.preset_file{n}andabsolute_path{n}- the source for each slot; the absolute path overrides the dropdown.keyword+keyword_mode- filtering over the combined list. Here's the trick the README highlights: since lines carry file-name prefixes, searchingcolors.txt:narrows the pool to that one file, which keeps indices stable.selection_mode,preset_index,seed- the usual selection machinery, identical to the rest of the pack.enable_wildcard-trueunless you want wildcard syntax emitted literally.
Outputs are the pack standard: text (wire to your prompt), preset_list (numbered, for finding indices), and selected_info (what was selected and why). If every slot is disabled or nothing survives the filter, text is an empty string - not an error - and selected_info tells you what happened.
Install
ComfyUI Manager search "Prompt Preset Selector", or clone it:
cd ComfyUI/custom_nodes
git clone https://github.com/shin131002/ComfyUI-Prompt-Preset-Selector.git
pip install pyyaml # optional, only for YAML files; usually already present
Restart ComfyUI and you're done. No models, no extra runtimes.
Where people get burned
Two things, both easy to hit:
- Disabling a slot renumbers everything. Turning off
enabled2removes that file's lines from the pool entirely, which shifts the indices of everything after it. If you rely on a fixedpreset_index, scope with a keyword prefix likecolors.txt:so the numbering stops moving. - File-name prefixes can collide. The prefix is just the file name, not the path - two files named
colors.txtin different folders share a prefix, so you can't scope between them. (The Folder node in this pack fixes that with relative paths; here, rename the files.)
Also worth knowing: this pack ships with a blunt "no individual support" disclaimer - it's MIT, so the support model is "fork it." Fine for a utility this small, but don't file a bug expecting a fix on a schedule.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| enabled1 | BOOLEAN | true | — |
| preset_file1 | COMBO | 1 options: (None) | |
| absolute_path1 | STRING | — | |
| enabled2 | BOOLEAN | true | — |
| preset_file2 | COMBO | 1 options: (None) | |
| absolute_path2 | STRING | — | |
| enabled3 | BOOLEAN | true | — |
| preset_file3 | COMBO | 1 options: (None) | |
| absolute_path3 | STRING | — | |
| keyword | STRING | — | |
| keyword_mode | COMBO | OFF | 3 options: OFF, AND, OR |
| selection_mode | COMBO | Manual | 4 options: Manual, Sequential, Sequential (continue), Random |
| preset_index | INT | 00–9999 | — |
| seed | INT | 00–18446744073709550000 | — |
| enable_wildcard | BOOLEAN | true | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| preset_list | STRING | — |
| selected_info | STRING | — |