๐๐ฒ Text scrambler (๐ง Character)
Mutate one good sentence instead of writing ten
- STRING
Different animal from the pack's Text Generator nodes, which build a character description from scratch category by category. This one takes a sentence you've already written - the default input is a full portrait prompt, something like "photography portrait of a happy middle-aged swedish woman nurse with a fit body, wearing a black headband, large blue parka and orange jeans" - and randomly swaps out the words that fall into whichever categories you've turned on. You keep the sentence structure you liked, and just get variation on the details.
How it works
Under the hood it's matching against a JSON file - scrambler/character_scrambler.json, sitting in the pack's own folder - that maps out category word-lists: colors, emotions, nationalities, clothing pieces, and so on. Turn on a category with its boolean toggle and the node looks for words in your input text that belong to that category, then replaces them with a random pick from the same list, seeded by the seed value so you can reproduce a specific scramble or roll a new one by changing the seed. Leave a category off and words that would match it are left untouched. Because the file is plain JSON sitting in your install, you can open it and edit the word lists if the built-in options don't cover what you want.
The inputs and outputs that matter
text(STRING, multiline) - the base sentence to scramble. Comes with a full example prompt pre-filled so you can see the intended format.seed(INT) - controls which random substitutions get picked; same seed, same result.- A stack of optional booleans, all off by default:
image_styles,ages,sex,body_types,colors,emotions,nationalities,clothing_head,clothing_top,clothing_bottom,occupations,sizes,image_types- flip on whichever categories you want randomized; the rest of the sentence stays as written. - Output:
STRING- the scrambled sentence, ready to feed straight into your prompt encoder or a Show node to check it first.
How to install it
Via ComfyUI Manager: search Bjornulf_custom_nodes, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/justUmen/Bjornulf_custom_nodes
cd Bjornulf_custom_nodes && pip install -r requirements.txt
then restart ComfyUI. No special dependency for this node specifically, but the shared requirements.txt for the whole pack still gets pulled in.
Common issues & troubleshooting
Nothing changes when you run it. If every category toggle is off, the node has nothing to substitute and just passes the sentence through unchanged. Turn on at least one category boolean.
A category is on but nothing in that category changes. The substitution only works on words the JSON word-list actually recognizes - if your sentence phrases something in a way the list doesn't match (a color described unusually, say), it won't get swapped. Check scrambler/character_scrambler.json in the pack's install folder to see exactly what it's matching against, and add to it if you need more coverage.
Same seed, different-looking result across runs. Changing which categories are enabled changes what the node is scrambling, even at the same seed - the seed controls the random picks within whatever categories are active, not a global lock on the whole output. If you want a fully reproducible result, keep both the seed and your toggle selection fixed.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | photography portrait of a happy middle-aged swedish woman nurse with a fit body, wearing a black headband, large blue parka and orange jeans. | โ |
| seed | INT | 0 | โ |
| image_stylesopt | BOOLEAN | false | โ |
| agesopt | BOOLEAN | false | โ |
| sexopt | BOOLEAN | false | โ |
| body_typesopt | BOOLEAN | false | โ |
| colorsopt | BOOLEAN | false | โ |
| emotionsopt | BOOLEAN | false | โ |
| nationalitiesopt | BOOLEAN | false | โ |
| clothing_headopt | BOOLEAN | false | โ |
| clothing_topopt | BOOLEAN | false | โ |
| clothing_bottomopt | BOOLEAN | false | โ |
| occupationsopt | BOOLEAN | false | โ |
| sizesopt | BOOLEAN | false | โ |
| image_typesopt | BOOLEAN | false | โ |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | โ |