DJZ Zero Prompt V2
DJZ Zero Prompt V2 and JSON profiles
- prompt
V1 of DJZ Zero Prompt gives you 188 trillion prompts and exactly one vocabulary: the author's. V2 is the one that actually gets interesting, because it swaps that hard-coded vocabulary for JSON profiles you can write, borrow, or bend toward whatever genre you're actually making. Same seed-plus-index determinism, same zero-file story - but now the "space" you're sampling is yours.
What it is
Same idea as its little sibling: seed + prompt_index in, a computed positive prompt out, perfectly reproducible. The difference is a new profile dropdown up top, which lists JSON files from the pack's /profiles folder. The default profile reproduces the V1 vocabulary (the docs say V2 is backward compatible with V1's generation algorithm), and the repo ships nine more - cyberpunk.json, fantasy.json, plus community ones with names like araki-jojo, zero-Nihei, and womanv3_profile. That last batch is a nice tell for what the author thinks this is for: genre and artist-style prompt spaces you can drop into a workflow wholesale.
How it works
Mechanically it's identical to V1 - xxhash32 over (seed, prompt_index, coordinate), hash % pool_size to pick from each pool. The only difference is where the vocabulary lives. A profile is a JSON file with a templates array and a pools object; every {pool_name} in a template gets filled by hashing into the matching pool. So {subject} {action} {environment}, {style}, {lighting}, {details} with pools for each of those names generates an endless, deterministic stream of variations on that one structure.
On load the pack scans /profiles for *.json and builds the dropdown - which means the single most common question has a one-line answer: yes, you must restart ComfyUI after dropping in a new profile. The file gets read and cached per profile, so it's not re-read every run. And the error handling is forgiving in a way that can bite you silently: a profile with a malformed JSON, or a template referencing a pool that doesn't exist, doesn't crash - it returns an error string, or leaves a [key] placeholder, as the "prompt." You'll notice, but only if you're looking at the output text.
The inputs that matter
- profile - the vocabulary selector; this is the whole point of V2.
- seed and prompt_index - identical to V1. Note the numbers only mean something within a profile: same seed and index give different prompts across profiles, which is how you compare genres side by side.
- prefix / suffix - optional text, concatenated with no separator, so add your own space or comma.
Output is a single STRING prompt, straight into a CLIP Text Encode positive input. It's prose rather than booru tags, so it sings on SDXL- and Flux-style natural-language models, and wilts a bit on Pony/Illustrious.
Building your own profile
The README's method is copy-and-edit: grab an existing profile, rename it, rewrite the pools and templates, restart. The structure is simple enough to hand-write:
{
"name": "My Style",
"templates": ["{subject} in {environment}, {style}, {lighting}"],
"pools": {
"subject": ["a lone wanderer", "a scarred veteran"],
"environment": ["a ruined observatory", "an empty highway"],
"style": ["cinematic", "matte painting"],
"lighting": ["blue hour", "headlight glow"]
}
}
There's also a bundled Claude skill (zeroprompt-profile-builder) that reverse-engineers a plain .txt list of prompts into a profile - feed it a corpus you like and it decomposes it into pools. One real gap: there's no in-ComfyUI editor, so profile building is hand-rolled JSON (or that skill) and a restart each time. Fiddly, but the payoff is a prompt space that's actually yours.
Install
Identical to V1 - one dependency, nothing heavy:
cd ComfyUI/custom_nodes
git clone https://github.com/MushroomFleet/ComfyUI-DJZ-ZeroPrompt
cd ComfyUI-DJZ-ZeroPrompt
pip install -r requirements.txt
Or use ComfyUI Manager (search "DJZ-ZeroPrompt"). requirements.txt is just xxhash>=3.0.0; there's an install-portable.bat if you're on the portable build. No models, no API, offline-friendly.
Troubleshooting
- New profile missing from dropdown - restart ComfyUI; the list is built at startup.
- Prompt comes out as an error string - your JSON is malformed or the file isn't in
/profiles; the node returns errors as text rather than throwing. [pool_name]appearing in output - the template references a pool you didn't define. Either add it topoolsor fix the template.- Same seed+index giving "wrong" results - you changed profiles; coordinates are per-profile.
Worth pairing with the DJZ Zero Prompt Profile Info node in the same pack, which prints the pool sizes and total combinations for any profile - handy for sanity-checking a profile you just hand-built.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| profile | COMBO | default.json | Select vocabulary profile (JSON files in /profiles folder) |
| seed | INT | 00–4294967295 | World seed - different seeds explore different prompt universes |
| prompt_index | INT | 00–4294967295 | Position in infinite prompt space - each index is a unique prompt |
| prefixopt | STRING | Text to prepend to the generated prompt | |
| suffixopt | STRING | Text to append to the generated prompt |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | Generated prompt as a single line paragraph |