Nodes/DJZ-Nodes/Zenkai Prompt V3
ComfyUI Node

Zenkai Prompt V3

Zenkai Prompt V3

By MushroomFleet·Created 2 years ago·Updated 5 months ago· 78
Zenkai Prompt V3
    • STRING
    text_file
    seed0
    interpolation_mode
    division_preset
    prefix
    suffix

    Zenkai Prompt V3 is the family's remix machine. Where the plain Zenkai-Prompt just returns a random line from a text file, V3 takes that line, chops it into sections, and swaps some of those sections with parts of other lines - from the same file, or from completely different files in the pack. The result is a mashup prompt you'd never have written by hand. Think of it as "interpolation" in the literary sense: you're blending sources, not math.

    It's part of the Zenkai prompt family in DJZ-Nodes, and the use case is exploration. You want weird, unexpected combinations to feed a batch, or you're stuck and want the node to surprise you with a premise. It won't always be coherent - that's the point, and you'll want to prune the output before committing to a final render.

    How it works

    The mechanism is clearer than the name suggests. The node:

    1. Picks a base line from your chosen file using the seed.
    2. Splits that line into N sections by word count (N comes from division_preset).
    3. Depending on interpolation_mode, replaces every section after the first:
      • lines - each section gets swapped with the matching section of a random other line from the same file.
      • directory - sections get swapped with matching sections of lines pulled from random files across the whole prompts folder.
    4. Joins the sections back together and wraps them in your optional prefix/suffix.

    So with fifths + directory, you get a sentence whose opening comes from one story, whose middle comes from a cyberpunk file, and whose ending comes from a third source entirely. It's a cut-up experiment, Burroughs-style, running inside your node graph.

    The inputs that matter

    The seed and text_file behave like the base node. The two that make V3 V3:

    • interpolation_mode - none (just return the base line, effectively the same as the plain node), lines, or directory. This is the flavor dial.
    • division_preset - words through fifths. Controls how many sections the prompt is carved into, and therefore how much of it gets replaced. More sections = wilder blends. With words (split every word), the result is nearly random text.

    Plus the optional prefix and suffix strings, which wrap whatever came out.

    Output

    One STRING - the interpolated line. Feed it into a CLIP Text Encode and see what your model makes of the mashup.

    Install

    Same pack as everything else here:

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

    Restart, or use ComfyUI Manager ("DJZ-Nodes"). Pure-stdlib node; the pack's heavy dependencies are for its other 100+ nodes, not this one.

    Gotchas

    • Results are chaotic on purpose. Directory mode pulling from 204 files will occasionally produce nonsense. That's the feature - treat output as raw material.
    • The split is by word count, not by sentence or clause, so sections can cut mid-phrase. Accept the jank.
    • Seed does double duty: it both picks the base line and drives the section swaps, so a new seed is a fully new blend.
    • Prefix/suffix only wrap the final string - they don't get interpolated themselves.

    If you want reproducible, curated randomness from a single file, the plain Zenkai-Prompt is calmer. If you want the node to actively surprise you, V3 is where that starts.

    CategoryDJZ-Nodes

    Inputs (6)

    NameTypeDefaultDescription
    text_fileCOMBO204 options: 05-trad-obsessions.txt, cyberSocietyV4.txt, paradistro-gen.txt, Thorra-Actions-airlock.txt, LTXV-surrealist-scenes.txt, cyberninjav1.txt, +198
    seedINT00–4294967295
    interpolation_modeCOMBO3 options: none, lines, directory
    division_presetCOMBO5 options: words, halves, thirds, quarters, fifths
    prefixoptSTRING
    suffixoptSTRING

    Outputs (1)

    NameTypeDescription
    STRINGSTRING