Nodes/DJZ-Nodes/Zenkai Control Prompt V2
ComfyUI Node

Zenkai Control Prompt V2

Same bundles, now with a whitelist

By MushroomFleet·Created 2 years ago·Updated 5 months ago· 80
Zenkai Control Prompt V2
    • image
    • mask
    • depth
    • pose
    • canny
    • prompt
    prompt_folder
    seed0
    mode
    num_images1
    whitelist

    Zenkai Control Prompt V2 is what you get when someone takes a good idea (V1's folder-based ControlNet bundles) and flips the filtering logic. V1 lets you exclude entries with a blacklist; V2 lets you include only entries that match a whitelist. Same controlprompts/ folder structure, same six outputs (image, mask, depth, pose, canny, prompt), same suffix conventions (_M/_D/_P/_C). The difference is which side of the filter you operate from.

    If your folder is a big shared library and you only ever want the "portrait with a man holding an umbrella" entries, whitelisting is the far better tool. V1's blacklist says "not this"; V2 says "only this."

    How it works

    Mechanically it's V1, right down to the code path: it scans controlprompts/<folder>, finds base images with matching .txt prompts, resolves the _M/_D/_P/_C control variants (black placeholders if missing), and selects num_images entries in sequential (seed-indexed, looping) or random (seed-seeded) mode.

    The new knob is whitelist, replacing V1's blacklist. It's a comma-separated string where multi-word phrases go in quotes - photo, man, "man holding", landscape. An entry's prompt must contain at least one of those terms to be eligible; everything else is excluded before selection. Leave it empty and no filtering happens - every pair in the folder is fair game. Terms are matched as substrings, so man also catches snowman, which is the thing to remember when your whitelist feels too broad.

    When to use it

    • Curated batches: you have 500 pairs in a folder and want a run that only touches the 40 matching your whitelist. V2 is the node.
    • Shared libraries: multiple people/workflows drawing from one big controlprompts folder. Blacklists can't anticipate everything; whitelists make intent explicit.
    • Reproducible filters: same seed + same whitelist = same selection, every run. That's the Zenkai promise and V2 keeps it.

    Downsides are the flip side of the same coin: it's stricter, and if your whitelist is too narrow you'll get the "no valid pairs after filtering" path - an empty tensor and an error string in the prompt output, which is the pack's crash-proof way of telling you the filter ate everything.

    Installing it

    Same pack, same install:

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

    Restart ComfyUI, or search "DJZ-Nodes" in ComfyUI Manager. Populate controlprompts/ with categories and restart to see them in the dropdown.

    Troubleshooting

    • Selection is empty even though the folder has images. The whitelist matched nothing - remember it's substring matching, and check that your terms actually appear in the .txt prompt files.
    • man matches too much. Substring matching strikes again. Be more specific ("man holding" in quotes) - there's no exact-match option.
    • Whitelist does nothing. Empty string = no filtering. If you typed terms and it still loads everything, check the comma/quotes formatting; a malformed list parses to nothing.
    • Same black-image placeholder behavior as V1. Missing _D/_P/_C files come out as black placeholders, not errors.

    V1 vs V2 is a real choice, not a strict upgrade - pick by whether your filtering problem is "exclude a few" (V1) or "include only these" (V2). For a big organized library, V2 is the one that earns its keep.

    CategoryDJZ-Nodes

    Inputs (5)

    NameTypeDefaultDescription
    prompt_folderCOMBO1 options: default
    seedINT00–4294967295
    modeCOMBO2 options: sequential, random
    num_imagesINT11–10
    whitelistoptSTRING

    Outputs (6)

    NameTypeDescription
    imageIMAGE
    maskIMAGE
    depthIMAGE
    poseIMAGE
    cannyIMAGE
    promptSTRING