Nodes/DJZ-ENH-system/Zenkai-ENH V2
ComfyUI Node

Zenkai-ENH V2

A Dropdown For Your System Prompts (And The Folder Everyone Gets Wrong)

By MushroomFleet·Created about a year ago·Updated about 22 hours ago· 2
Zenkai-ENH V2
    • content
    • relative_path
    • name
    ◄enh_file▾►

    Zenkai-ENH V2 does exactly one thing: it reads a markdown file off your disk and spits the text out as a STRING. No model, no API, no key, no VRAM. That sounds like a nothing node until you've spent an evening pasting a 900-word system prompt into a text box, then tried to share that workflow with someone else.

    That's the job it solves. A good system prompt for a local enhancer - you are a prompt enhancer, output JSON with four shots, 80 to 100 words each, no markdown - is long, and once enhancement became a node in the graph the instruction steering the LLM ended up buried in a widget, copy-pasted everywhere, versioned nowhere. Zenkai-ENH V2 answers with the most boring solution available: keep the prompts as files, pick one from a dropdown.

    How it works

    The node scans a folder called ENH-Library that sits next to its own Python file - ComfyUI/custom_nodes/DJZ-ENH-system/ENH-Library - and walks it recursively at any depth. Every .md it finds becomes an entry in the enh_file dropdown, labelled by relative path with forward slashes: example-B/styles/cinematic/image-cinematic-system-prompt.md.

    That relative-path labelling is the real upgrade over the original Zenkai-ENH node, and it's subtler than it looks. Because folder names are part of the label string, ComfyUI's dropdown search filters on them. Type cinematic or wan and you get everything under that folder. In V1 those files sat in one flat ENH-store folder.

    Scanning skips hidden folders and files, skips __pycache__, and takes only .md - case-insensitively, so Prompt.MD counts. Reading is UTF-8 with a BOM stripper, which matters if you save prompts from Windows Notepad. The node also refuses paths that escape ENH-Library, so a saved workflow can't be pointed at ../secrets.md, and it exposes the file's modification time to ComfyUI's cache, so editing a template and hitting Queue again picks up your edit without a restart.

    Inputs and outputs

    One input: enh_file, a dropdown of every .md under ENH-Library. Pick your template, that's the whole interaction.

    Three outputs, all STRING:

    • content - the full text of the file. Wire this into your LLM node's system-prompt input (Ollama-based enhancers, API nodes, whatever you run).
    • relative_path - e.g. wan/i2v/motion.md.
    • name - the filename without extension, e.g. motion.

    The last two are for logging: route name into your filename nodes if you want to know which template produced which image. Most people leave them dangling.

    Do not wire content into a CLIP Text Encode and expect magic. A system prompt is an instruction for a language model, not a prompt for a diffusion model. Text in, text out.

    Installing it

    ComfyUI Manager, search DJZ-ENH-system, install, restart. Or by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/MushroomFleet/DJZ-ENH-system
    

    That's all of it. requirements.txt is comments only - nothing to pip install - and the install-portable.bat / PIP-MAN-V5.bat scripts are leftover scaffolding that installs zero packages. No model downloads.

    Naming heads-up: this is a separate repo from DJZ-Nodes, the much bigger pack by the same author (MushroomFleet), known for video upscalers and interlacing nodes. Same person, different install.

    Where people get stuck

    "No .md files found in ENH-Library." This is the one. V2 reads ENH-Library/; the original node read ENH-store/. The repo ships roughly twenty hand-written templates in ENH-store/ - the t2i and i2i enhancement prompts with their shot lists and JSON output rules - and only three demo files in ENH-Library/. If you installed this pack for those templates and expected them in the new dropdown, copy them across yourself:

    cd ComfyUI/custom_nodes/DJZ-ENH-system
    cp ENH-store/*.md ENH-Library/
    

    Sort them into subfolders while you're there. That's the entire point of V2.

    Your new file isn't in the dropdown. The list is built when ComfyUI asks the node for its input definitions, not on every run. Press R to refresh, or refresh the browser tab; a restart works too. New files never show up instantly.

    It fails quietly, and that's the trap. Rename a .md that a saved workflow points at and you don't get a red error box - you get the string Error: File 'x' not found in ENH-Library folder coming out of content. That string flows straight into your LLM's system prompt, where a chat model will cheerfully read it as an instruction. If your enhancer's output suddenly goes strange, look at what's actually on content before you blame the model.

    Your own prompts live inside a repo Manager updates. Anything you drop into ENH-Library is an untracked file in a git clone. A plain git pull leaves it alone; a forced update might not. Keep a second copy of your good templates somewhere else.

    Honest summary: this node is twenty lines of file I/O, and it's correct. The value isn't the node - it's that it pushes you to stop hiding your best prompts inside workflows. Write them once, refine them in a text editor, let the graph point at them.

    CategoryDJZ-Nodes

    Inputs (1)

    NameTypeDefaultDescription
    enh_fileCOMBO3 options: example-A/video-system-prompt.md, example-B/image-system-prompt.md, example-B/styles/cinematic/image-cinematic-system-prompt.md

    Outputs (3)

    NameTypeDescription
    contentSTRING—
    relative_pathSTRING—
    nameSTRING—