提示词选择器 (Prompt Selector)
Glue a prefix onto whatever prompt you're currently juggling
- prompt
Don't let the name fool you - this isn't a dropdown of saved prompts, it's a two-string plumbing node. You give it a chunk of tags you're currently working with and, optionally, a fixed prefix that should always come first, and it hands back one combined string. That's the whole job.
Why you'd reach for it
If you're prompting anime/Danbooru-style models (this whole pack is built around that workflow - it sits in the README's "image & prompt core" group right next to the Danbooru Gallery browser node), you end up with two kinds of prompt content: stuff that changes every time you generate, and stuff that never does. The never-changes part is usually your quality tags, an artist name, or a character tag you want anchoring every single output. Re-typing that into a giant CLIP Text Encode box every time you swap the variable part is how typos creep in and consistency drifts. PromptSelector gives that fixed part its own slot so it can't get lost or mistyped mid-session.
The obvious pairing is with the pack's own Danbooru Gallery node, which outputs a raw tag string pulled straight off a Danbooru post. Route that into selected_prompts, put your standing quality/character tags in prefix_prompt, and the combined prompt output is what actually goes to your text encoder - so browsing for reference images and keeping your baseline tags stable become two separate, non-interfering jobs.
The inputs and outputs that matter
There are only two fields, and they're both strings:
selected_prompts(required, defaults to empty) - the variable part. Whatever tags you're currently selecting, pasting, or piping in from elsewhere.prefix_prompt(optional) - the fixed part, prepended ahead ofselected_prompts.
One output: prompt (STRING) - the combined result, ready to wire into a CLIP Text Encode node (or into a cleanup node first - see below).
The pack ships no public description for this node beyond its schema, so treat it as exactly what the fields say: a concatenator, not a smart prompt engine. It's not going to dedupe repeated tags or fix punctuation for you.
How to install it
Through ComfyUI Manager: search for "ComfyUI-Danbooru-Gallery", install, restart. By hand:
cd ComfyUI/custom_nodes
git clone https://github.com/Aaalice233/ComfyUI-Danbooru-Gallery.git
cd ComfyUI-Danbooru-Gallery
pip install -r requirements.txt
Then restart ComfyUI. The pack's dependencies are light - requests, aiohttp, aiosqlite, psutil, Pillow - nothing that downloads a model checkpoint, so this node is usable the moment the pack loads.
Common issues & troubleshooting
Output looks doubled-up or has a stray comma at the seam. Because this node just concatenates strings, if both prefix_prompt and selected_prompts end/start with commas or trailing spaces you'll get an ugly joint (1girl,, red hair). This pack ships a dedicated fixer for exactly that - run the output through PromptCleaningMaid (same pack) before it hits your encoder, and its comma/whitespace cleanup will tidy the seam automatically.
Output is just your prefix, nothing else. selected_prompts defaults to an empty string - if you haven't wired anything into it (or typed anything in), the node will happily output just the prefix. Worth a glance if your generations suddenly lost all their subject-specific tags.
Node doesn't show up in the menu at all. This is a pack-load problem, not a node-specific one: confirm the repo landed at exactly ComfyUI/custom_nodes/ComfyUI-Danbooru-Gallery, confirm pip install -r requirements.txt actually completed, and check the ComfyUI console on startup for an import error from this pack specifically - that log line will tell you which dependency is missing far faster than guessing.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| selected_prompts | STRING | — | |
| prefix_promptopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |