Emotion
The smallest change that changes everything
- text
- id
Want to see how much a few words move an image? Keep your character, pose and background locked, and only change the emotion block between runs. Same seed, same everything else - swap smiling for angry glare and the whole feel of the piece shifts. That's what the Emotion selector from the Prompt String Selector pack is for: your expressions, stored as text files, one dropdown away.
It's a small node with a small job, and that's fine. In the pack's bigger picture - where character, art style, camera, background and clothing each get their own file-folder and dropdown - emotion is the block you'll flip most often once you have a character sheet you like. And on tag-based models (Illustrious, NoobAI, Pony, SDXL) these read cleanly: smile, soft eyes, blush is exactly the vocabulary the model was trained on.
How it works
Reads ComfyUI/custom_nodes/ComfyUI-Prompt-String-Selector/data/emotion/. Each .txt file is a dropdown entry; the filename minus extension is the label and the leading number is the id output. Ships with 01_none.txt (a near-empty no-op block) so you can wire it in with a "no change" option right away.
Standard pack rules: // and /* */ comments in files are stripped, files sort by numeric prefix, and the output text is comma-terminated so it chains into the pack's Aggregator.
Inputs and outputs
- emotion - dropdown of your saved expressions.
- emotion_custom - multiline override; choose
custom_inputto type a one-off expression instead (idbecomes 0).
Outputs: text (STRING, comma-terminated) and id (INT). text → positive prompt path; id → any numeric logic or just eyeball it in the preview.
Install
ComfyUI Manager → search "Prompt String Selector", or:
cd ComfyUI/custom_nodes
git clone https://github.com/itom0717/ComfyUI-Prompt-String-Selector.git
Restart. No dependencies, no models - the entire pack is the Python standard library.
Gotchas
Dropdowns rebuild at startup; new emotion files need a restart. If you're A/B testing expressions, preload several files in one restart rather than going one at a time.
One genuinely useful habit: keep expressions short. smiling, eyes closed, slight blush beats an essay, and it keeps the emotion block from crowding out the character block in the model's attention. The dropdown makes it painless to build up a small library - a dozen expressions covers most of what you'll actually want.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| emotion | COMBO | 2 options: 01_none, custom_input | |
| emotion_custom | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| id | INT | — |