ComfyUI Node

DJZ Zero EDIT

Endless edit prompts — and you can actually reproduce the good ones

By MushroomFleet·Created 7 months ago·Updated 6 months ago· 0
DJZ Zero EDIT
    • edit_prompt
    profiledefault-EDIT.json
    seed0
    prompt_index0
    prefix
    suffix

    The DJZ Zero EDIT node is a prompt autopilot for image-editing models. Give it two numbers and it hands you a complete, sentence-length edit instruction - "add a small knitted wizard hat on the subject's head, positioned naturally between the ears and angled slightly" - ready to feed straight into a FLUX.1 Kontext, Nano Banana, or Qwen-Image-Edit workflow.

    Why this exists

    The current crop of instruction-following editors are prompt-driven in a way SD 1.5 never was. You don't tag an edit, you describe it: "change only the blue sofa to a vintage brown leather chesterfield. Keep the pillows and lighting unchanged." The way prompt engineering has shifted, these models are LLM-encoded and want narrative instructions - a well-structured sentence beats comma soup.

    That's great when you're deliberately editing one image. It's a pain when you're exploring. For a batch of variations - testing a look, generating assets, A/B-ing phrasings - hand-writing every prompt is the bottleneck, and the "random" ones you like? Good luck recreating them. That's the gap this node fills. It's deterministic procedural generation: the same seed plus the same prompt_index produces the same edit prompt, on any machine, forever. The pack calls this ZeroBytes "position-is-seed," a sibling of the older DJZ-ZeroPrompt idea, reworked for edit instructions.

    How it works

    It's almost embarrassingly simple under the hood, and that's a feature. The node hashes your coordinates with xxhash32 - edit_hash(seed, prompt_index, 0) picks a sentence template, then edit_hash(seed, prompt_index, 1..n) picks one phrase from each vocabulary pool. A modulo maps each hash into its pool, and Python's template.format() assembles the paragraph. No iteration, no sampling, O(1) every time.

    The "4.4 billion combinations" number isn't marketing, it's just arithmetic: 7 templates × the pool sizes in the default profile. Little-endian packing plus xxhash's cross-platform determinism is what makes the same seed reproduce on a different machine - the whole point of the thing.

    The inputs that matter

    Three of them, plus two you'll rarely touch:

    • profile - a dropdown of vocabulary packs from profiles/edit/. Seven ship with the pack, and they get weird: the default, plus ones themed after artists (Araki, Nihei) and a dragonsheaven profile.
    • seed - the "world seed." Change it to hop to a different universe of edits.
    • prompt_index - your position in that universe. Each index is a different edit; consecutive indexes give related but distinct instructions.

    prefix and suffix just prepend and append raw text. "Raw" is the operative word - no spaces are inserted for you, so a carelessly written prefix can glue itself onto the first word of the prompt.

    What comes out

    One edit_prompt string, a single paragraph. Wire it into whatever prompt input your editor node takes - typically the text-encode node feeding Kontext, Nano Banana, or similar. Nothing else leaves this node.

    Install

    Two-minute job, and the rare ComfyUI install with no model downloads and no GPU requirement - this is pure string math.

    cd ComfyUI/custom_nodes
    git clone https://github.com/MushroomFleet/ComfyUI-ZeroEDIT-nodes
    pip install xxhash
    

    Then restart ComfyUI. Easier still: ComfyUI Manager → search "ZeroEDIT" → Install → Restart. xxhash is the entire dependency list, and Manager pulls it in for you.

    Where people trip up

    • The xxhash ImportError at startup is just the missing pip install. Fix it, restart.
    • A broken profile doesn't error loudly. If the JSON has a typo, the node silently outputs [Error loading profile '...': ...] as your prompt, which then flows straight into your editor. Preview before you queue.
    • Your custom profile isn't in the dropdown. The list is built when ComfyUI loads the node, scanned from profiles/edit/. Drop a new JSON file in and restart before expecting it to appear.
    • "4.4 billion" is technically true and slightly silly. With only 7 templates and modest pools, big chunks of that space are variations on the same instruction. It's a deep well, not an infinite one of genuinely distinct ideas.

    If you only ever hand-write your edits, you don't need this. If you're automating or batch-exploring, it's the rare prompt node that keeps every good idea reproducible. Full disclosure: it's a small, quietly distributed pack - you won't find much community chatter about it yet. Judge it on the workflow, not the following.

    CategoryDJZ-Nodes

    Inputs (5)

    NameTypeDefaultDescription
    profileCOMBOdefault-EDIT.jsonSelect edit vocabulary profile (JSON files in /profiles/edit/ folder)
    seedINT00–4294967295World seed - different seeds explore different edit prompt universes
    prompt_indexINT00–4294967295Position in infinite edit prompt space - each index is a unique edit
    prefixoptSTRINGText to prepend to the generated edit prompt
    suffixoptSTRINGText to append to the generated edit prompt

    Outputs (1)

    NameTypeDescription
    edit_promptSTRINGGenerated edit prompt as a single paragraph