ComfyUI Node

DJZ Zero ENH V2

No LLM, no API key, no cost — DJZ Zero ENH V2 pads your prompt deterministically

By MushroomFleet·Created 7 months ago·Updated 5 months ago· 3
DJZ Zero ENH V2
    • enhanced_prompt
    prompt
    profiledefault.json
    seed0
    intensitymoderate
    max_words150
    prefix
    suffix

    The name is a lie in the best possible way: there's no AI here at all. DJZ Zero ENH V2 takes whatever prompt you typed, detects which semantic categories are missing (subject, environment, lighting, camera, mood…), and fills those gaps from a vocabulary pool - selected by hashing, not by a model. Same (prompt, seed, intensity, profile) always produces the exact same enhanced prompt, on every machine, forever. That's the whole pitch: deterministic prompt enhancement with zero inference, zero API cost, and sub-100ms latency.

    It sits in the same corner of your workflow as an LLM-based "prompt expander," but it's a very different tool. An LLM enhancer is a dice roll per call - non-deterministic, slow, costs tokens, and needs a key. ZeroENH is a pure function. If you're generating a batch of images and want every variation to be reproducible, or you're sharing a workflow and want it to behave identically for whoever downloads it, that's the niche it was built for.

    How it works

    The mechanism is called "ZeroBytes position-is-seed." Roughly: it tokenizes your prompt, classifies tokens into eight categories, finds the gaps, then picks fill words with xxhash32(seed + input_hash + coordinate) % pool_size. A hash function has no state and no randomness, so the same coordinates always return the same vocabulary entry - hence "O(1) coordinate hashing." Before assembly it applies anti-pairing rules (an underwater scene won't get golden hour lighting, pixel art won't get ray tracing), then merges your original tokens, dedupes, and truncates to your word cap. Unclassified tokens - including LoRA trigger words and embeddings - pass through untouched, which is the part that keeps this safe to drop in front of a CLIP Text Encode.

    V2's actual addition is JSON profiles: theme-specific vocabularies instead of the hardcoded default. Nine ship out of the box - default, cyberpunk, fantasy, horror, plus community ones like zeroENH-Nihei and zeroenh-Araki. Profiles support inheritance via an extends field and can define custom categories beyond the standard eight, so the whole thing is retunable to a genre.

    The inputs that matter

    • prompt - what you want enhanced. Keep it short; the node's job is to dress it up.
    • profile - dropdown of every .json in nodes/profiles/. This is the V2 selling point.
    • seed - the determinism knob. Change it to get a different (but still reproducible) enhancement.
    • intensity - minimal/light/moderate/full = 25/50/75/100% of detected gaps filled. Default is moderate, which is usually right.

    The optional max_words (default 150), prefix, and suffix are self-explanatory. One output, enhanced_prompt (STRING), wires straight into the positive input of CLIP Text Encode (or however you feed text to your model).

    Install

    Easiest via ComfyUI Manager - search "ZeroENH" and hit Install. Or manually:

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

    Then restart ComfyUI. The dependency is a single line (xxhash>=3.0.0) - no model files, nothing heavy to download. Nodes appear under DJZ-Nodes.

    Where people get burned

    First: new profiles won't show up until you restart ComfyUI - discovery happens at load time. Drop your .json in nodes/profiles/ and restart. Second, if a profile file is malformed, the node silently falls back to the built-in default and logs a [ZeroENH] warning to the console; easy to miss if you're not watching. Third, and this one is on the concept, not the node: prompt length. The attention cap is real - past roughly 75–100 effective tokens on many encoders the model starts drifting, and modern LLM-style encoders read your prompt as an instruction, so a 150-word padded prompt can do more harm than good. Use minimal or light if you already wrote a detailed prompt; reach for full only when you genuinely want the kitchen sink.

    Honest caveat: this is a niche pack from a small author (Drift Johnson / MushroomFleet), and the DJZ repos have been reorganized before - pin a commit if it's mission-critical. But for zero-cost, offline, perfectly reproducible prompt padding, it's a solid middle ground between "type it yourself" and "pay an API to hallucinate adjectives."

    CategoryDJZ-Nodes

    Inputs (7)

    NameTypeDefaultDescription
    promptSTRINGInput prompt to enhance
    profileCOMBOdefault.jsonSelect enhancement profile (JSON files in /profiles folder)
    seedINT00–4294967295Seed for deterministic enhancement - same seed = same output
    intensityCOMBOmoderateEnhancement intensity: minimal=25%, light=50%, moderate=75%, full=100% of gaps filled
    max_wordsoptINT15010–500Maximum word count for output
    prefixoptSTRINGText to prepend to enhanced prompt
    suffixoptSTRINGText to append to enhanced prompt

    Outputs (1)

    NameTypeDescription
    enhanced_promptSTRINGDeterministically enhanced prompt