APNext Sentence Mixer
Shuffle sentences from up to four inputs
- STRING
A small utility that does exactly one thing: take text from up to four inputs, break it into sentences, and mix them together into one output. It's a variation engine. Feed it a couple of prompt fragments and it recombines them, so you can shake loose new phrasings without rewriting anything by hand. Nothing clever under the hood, no model, no API - just string shuffling. But it's the kind of node that quietly earns a spot in a prompt-exploration graph.
How it works
You wire text into input1 (and optionally input2 through input4), the node splits each on sentence boundaries, mixes the pieces, and emits a single combined STRING. Because the mixing draws on however ComfyUI re-runs the node, you use it to generate variety across a batch - different combinations of the same source sentences, over and over, instead of one fixed prompt.
It pairs naturally with the rest of this pack: let a prompt generator or the LLM node produce a few candidate descriptions, run them through the mixer, and you get remixed hybrids you wouldn't have written deliberately. Think of it as controlled randomness at the sentence level rather than the word level.
Inputs and outputs that matter
- input1 (multiline, required) - your primary text. This one always has to be connected or filled.
- input2, input3, input4 (multiline, optional) - additional sources to mix in. Leave them empty to just reshuffle input1's own sentences.
The single output is STRING - the mixed result. Wire it into a CLIP Text Encode, or into another string node for further processing.
Installing it
ComfyUI Manager: search comfyui_dagthomas, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/dagthomas/comfyui_dagthomas
cd comfyui_dagthomas
pip install -r requirements.txt
The mixer is pure text handling - no API key, no downloads. The pack's larger dependency list is only for its LLM and image-FX nodes.
Common issues
The output is only as coherent as the sentences you feed it - mixing text that isn't actually written in sentences (a bare tag list, for instance) gives you jumbled fragments, because there's nothing clean to split on. It's a natural-language tool; use it on prose-style prompts. That also makes it a better fit for models that read prompts as instructions (Flux, Z-Image, the LLM-encoded crowd) than for strict tag-based SDXL prompting, where sentence order matters less and comma tags are the currency. If you're on a tag model, the String Merger in this same pack is usually the more sensible utility.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| input1 | STRING | — | |
| input2opt | STRING | — | |
| input3opt | STRING | — | |
| input4opt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |