ComfyUI Node

Prompt Tester

Stop guessing which prompt word matters — remove it and look

By drphero·Created about a year ago·Updated about a year ago· 1
Prompt Tester
    • prompts
    • labels
    prompt
    delimiter,
    include_baselinetrue

    Every prompt has cargo. Somewhere in that comma-separated list there's a tag you copied from a workflow that's doing absolutely nothing - or worse, fighting the rest of your prompt. Prompt Tester is the tiny utility that answers the question instead of letting you argue about it: it takes your prompt, splits it apart, and generates one variation per phrase with that phrase removed. Same prompt, minus one piece, side by side. You see instantly which keyword earned its place.

    This is the "fix the seed, generate with and without, change nothing else" test that prompt-engineering folklore keeps telling you to run - just automated across the whole prompt in a single pass. It's dead useful for cleaning up an inherited forty-keyword negative, or figuring out whether your "masterpiece, best quality" boilerplate is doing anything on the checkpoint you actually run.

    How it works

    The mechanism is brutally simple, and that's the whole charm. There's no model, no API, no hidden pipeline - the node is a couple dozen lines of pure string manipulation. It splits your prompt on a delimiter, strips whitespace, and drops empty phrases. Then for each phrase it rebuilds the prompt with just that one omitted, and emits the pair: the modified prompt and a label naming what was taken out. Labels over 30 characters get truncated so they stay filename-friendly. That's it. No dependencies either - the pack's pyproject.toml lists an empty dependencies array, so there's nothing to install besides the node itself.

    The inputs that matter

    Only three, and you'll touch two of them:

    • prompt (multiline text) - your full prompt. This is where the "negative prompt" or "positive prompt" string goes; the node doesn't care which.
    • delimiter (default ,) - what to split on. Comma works for booru-style tag lists. If your prompt uses line breaks or AND as its separator, type that instead.
    • include_baseline (default on) - prepends the untouched original prompt as the first variation, labeled Baseline Full Prompt, so you always have the control image to compare against.

    What the outputs wire into

    Both outputs are lists: prompts (each variation, one phrase removed) and labels (which phrase each one lost). The author's own example workflow routes prompts into a CLIPTextEncode's text input and labels into an AddLabel node that stamps each rendered image with what's missing. When a list-flagged output feeds a normal scalar input, modern ComfyUI runs the downstream chain once per item - so one graph renders all N variations automatically. Queue it, walk away, come back to a row of images.

    The one thing that makes the comparison honest: lock your seed. If the seed changes per run, you're not testing the phrase, you're testing the RNG. Keep it fixed so the only difference between any two images is the keyword you deleted.

    Install

    ComfyUI Manager, search "ComfyUI-PromptTester", install, restart. Or the manual route:

    cd ComfyUI/custom_nodes
    git clone https://github.com/drphero/comfyui_prompttester.git
    

    No model downloads, no requirements.txt, no API key. Restart ComfyUI and it'll be under utils/prompting as Prompt Tester.

    Where people get burned

    • The split is literal. If a phrase itself contains your delimiter - "jpg, artifacts" with a comma split - it gets chopped mid-phrase. Pick a delimiter that can't collide.
    • It won't read weighting syntax. (face:1.3) splits into two tokens at the comma and removes them as if they were separate tags. Fine for a rough test; don't expect it to respect attention weights.
    • Expect the answer to sometimes be "nothing." On LLM-encoded models, quality-tag boilerplate like masterpiece, 8k is inert by design - the encoder was never trained on it. A null result isn't a broken node, it's the finding. That's precisely why you ran the test.

    It's a thin node - you could hand-build these variations in twenty seconds. What it earns you is the batch: N images, labeled, generated in one queue, so the evidence is sitting there when you're done. For a tool this small, that's a fair trade.

    Categoryutils/prompting

    Inputs (3)

    NameTypeDefaultDescription
    promptSTRING
    delimiterSTRING,
    include_baselineBOOLEANtrue

    Outputs (2)

    NameTypeDescription
    promptsSTRING
    labelsSTRING