Zenkai Prompt V4
Prompt roulette, but you get to say 'no cats'
- STRING
Zenkai Prompt V4 is the node for the "I want variety, but not that variety" mood. It picks prompts at random from a text file - and lets you blacklist the ones you're tired of. It's the least glamorous node in the Zenkai suite and arguably the most useful if you generate a lot: roll the seed, get a fresh prompt, occasionally skip the folder full of cat images.
It's part of the DJZ-Nodes Zenkai prompt system, Drift Johnson's collection of prompt-engineering tools. The pack ships 200+ themed text files in its prompts/ directory (everything from cyberSocietyV4.txt to LTXV-surrealist-scenes.txt), and this node is how you browse them. V4's whole trick over its predecessors is the blacklist; V5 trades that for a sequential mode, so pick based on which failure mode annoys you more.
How it works
The text_file dropdown lists every .txt in the pack's prompts/ folder - one prompt per line, blank lines ignored. The node reads the file, applies your blacklist filter, seeds Python's random with your seed, and samples num_prompts lines without replacement. Selected lines get prefix and suffix wrapped around them, and the whole batch comes out as one comma-joined string.
The blacklist is the star input. It's case-insensitive substring matching, so cat kills every line containing "cat" anywhere, and quoting a phrase ("no humans") matches the whole phrase. You can mix both: cat, "red car", table. If the filter empties the pool, you get back the literal string "No prompts available after applying blacklist filter." - which will happily be fed into a CLIP encoder as garbage text, so keep an eye on the node's text output rather than just the image.
Inputs that matter
- text_file - dropdown of the ~200 shipped prompt files (drop your own into
custom_nodes/DJZ-Nodes/prompts/to add to it) - seed - reproducibility; same seed, same selection
- num_prompts - 1–10, joined with commas into the single output
- blacklist - comma-separated terms, quote multi-word phrases
- prefix / suffix - optional wrapping, e.g. prefix
masterpiece, best quality,to force quality tags onto every pick
Output is a single STRING - wire it into a CLIP Text Encode (or a Zenkai wildcard node on the way) and you're set. It's not a batch-aware node; you get one string, not one string per image.
Install
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 ComfyUI. This node has zero exotic dependencies - just the Python standard library. If it doesn't show up, it's the pack's silent-skip behavior: check the console for "Unable to import ZenkaiPromptV4".
Troubleshooting
Your own text files go in the pack's prompts/ folder and appear in the dropdown after a restart - the dropdown is built once, at node load. And remember the failure mode above: an over-aggressive blacklist that wipes the whole file returns a string, not an error, so a black screen with a weird prompt is usually the blacklist, not the sampler. Keep the blacklist short, and it's a genuinely nice little variety machine for batch work.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| text_file | COMBO | 204 options: 05-trad-obsessions.txt, cyberSocietyV4.txt, paradistro-gen.txt, Thorra-Actions-airlock.txt, LTXV-surrealist-scenes.txt, cyberninjav1.txt, +198 | |
| seed | INT | 00–4294967295 | — |
| num_prompts | INT | 11–10 | — |
| prefixopt | STRING | — | |
| suffixopt | STRING | — | |
| blacklistopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |