Nodes/DJZ-Nodes/String Chaos Modes
ComfyUI Node

String Chaos Modes

Six ways to mangle a prompt, from leet to full zalgo

By MushroomFleet·Created 2 years ago·Updated 5 months ago· 78
String Chaos Modes
    • STRING
    text
    mode
    seed0
    intensity0.5

    String Chaos is the DJZ-Nodes text-gremlin: it takes any string and destroys it in six different flavors. It's from the same pack that does cinematic video effects and Zenkai prompt engineering, and honestly it's the most purely fun node in there - the kind you reach for when you want prompt variations that are technically deterministic but look unhinged.

    What each mode actually does

    You pick one of six mode values and get a transformed string back:

    • L33T - swaps letters for numbers and symbols from a small lookup table (a4/@, e3, s5/$...). "Hello World" → "H3ll0 W0r1d".
    • aLtErNaTiNg - the sarcastic caps thing. Alternates upper/lower per character.
    • SCRAMBLED - keeps first and last letters of each word, shuffles the middle. "Hello" → "Hlelo".
    • EMOJI - appends emoji after a fixed set of recognized words (hello, world, love, money...). Unrecognized words pass through untouched.
    • ZALGO - stacks Unicode combining characters onto every letter for the classic glitch-corrupted look. This one respects intensity.
    • REDACTED - randomly replaces characters with , at a rate set by intensity. Greeting cards from a government that hates you.

    The inputs that matter

    • text - what gets mangled (multiline)
    • mode - the six-way menu above
    • seed - makes the mangling reproducible; change it for a different variation
    • intensity (0–1, default 0.5) - only affects ZALGO (how many corrupting marks per letter) and REDACTED (what fraction of characters get blocked). The other four modes ignore it entirely, which the docs admit.

    Output is a single STRING. Seed it, run it, wire the result into anything that takes text - a prompt, a caption, a filename.

    Why you'd bother

    Two real uses. First, deterministic prompt variation: because random.seed(seed) is called internally, the same seed + text always gives the same mangled output, so you can sweep seeds to generate a batch of weird variations without touching the base prompt. Second, pure aesthetic: L33T or ZALGO text in a caption, watermark, or a glitch-art pipeline has that proper internet-relic energy.

    The honest caveat: don't feed the output to a text encoder expecting quality. ZALGO is a string of combining marks, and most encoders will not thank you. This is a flavor node, not a serious prompt-enhancement tool - the pack's StringWeights and Zenkai nodes are the serious ones.

    Install

    Part of DJZ-Nodes by Drift Johnson. ComfyUI Manager → search "DJZ-Nodes", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/MushroomFleet/DJZ-Nodes
    cd DJZ-Nodes
    pip install -r requirements.txt
    

    Restart and you're done. It's pure Python with no extra deps of its own - the pack's hefty requirements.txt (librosa, numba, trimesh...) exists for its other nodes, so don't sweat it for this one.

    Gotchas

    The EMOJI mapping is tiny and fixed - it only knows about a dozen-odd words, so "love" gets a heart but "stunning" gets nothing. And because SCRAMBLED and L33T ignore intensity, don't assume the slider does anything until you're in ZALGO or REDACTED mode. Both behaviors are documented in the pack's own node notes, so it's not a bug so much as a feature that's thinner than the six modes suggest.

    CategoryCustom-Nodes

    Inputs (4)

    NameTypeDefaultDescription
    textSTRING
    modeCOMBO6 options: L33T, aLtErNaTiNg, SCRAMBLED, EMOJI, ZALGO, REDACTED
    seedINT00–18446744073709550000
    intensityFLOAT0.50–1

    Outputs (1)

    NameTypeDescription
    STRINGSTRING