TT_StoryCombiner
A random prompt, built one line per box
- STRING
ComfyUI gives you total control and, famously, no "surprise me" button. You can randomize seeds all day, but if the prompt text stays fixed, every run is the same subject wearing different noise. TT_StoryCombiner is the pack author's answer - the README says it's the node he actually uses in his own work - and it builds one prompt out of random lines picked from up to nine text boxes. Every run rolls fresh, and the same seed reproduces the same roll. It's randomised concatenation, nothing fancier.
How it works. Each of the nine text fields is a category, and every line inside a field is one option. On each run the node splits each box on newlines, strips whitespace, drops empty lines, picks one line at random from each box, then joins the survivors with a separator (default . ). Empty boxes simply contribute nothing. That's the whole mechanism - a handful of Python random.choice calls behind a random.seed(seed).
The inputs that matter:
text1throughtext9- multi-line boxes; one option per line. Nine categories is a lot; most setups use three or four and leave the rest blank.separator- default.. Set it to,if you're building tag-style prompts for an SDXL-lineage model rather than sentences.seed- set it to the same value and you get the same prompt back. Change it, or wire it from your KSampler, and you roll again.
The output is a single STRING, which you feed into anything that takes a string - most obviously the positive prompt input on a CLIP Text Encode.
The mixing trick the README is about. You don't have to type options inside the node at all. Wire a TT_TextInput's output into any of the boxes - the author's own screenshots feed it from separate text nodes, and since empty text is ignored, you can leave unused boxes blank without breaking the join. The README also suggests generating your option lines with a chatbot: ask it for twenty themed settings, paste them as twenty lines, done. That's the intended workflow, and it's why the node feels so much lighter than a full wildcard system.
Where people get tripped up:
- Each box contributes exactly one line. Want a category to appear twice in the prompt? You need a second box with the same content.
- It's random with replacement, so the same line can show up across runs. No "already used" memory.
- It reseeds Python's module-global
randomon every call. A changed seed here can nudge other random-based custom nodes in the same session - usually harmless, occasionally confusing. - The output is one string. If you want twenty prompts in a batch grid, this isn't the tool; a wildcard-style pack or ComfyUI's own batching is.
Install. ComfyUI Manager → search "TT_TextTools" → install, restart. Or the manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/zzubnik/TT_TextTools
then restart ComfyUI. There's no requirements.txt, no model download, no heavy dependency - the whole pack is plain Python. If a saved workflow asks you to install "TT_StoryCombiner," that's this pack.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| text1 | STRING | — | |
| text2 | STRING | — | |
| text3 | STRING | — | |
| text4 | STRING | — | |
| text5 | STRING | — | |
| text6 | STRING | — | |
| text7 | STRING | — | |
| text8 | STRING | — | |
| text9 | STRING | — | |
| separator | STRING | . | — |
| seed | INT | 0 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |