ComfyUI Extension: ComfyUI-PromptTester
Automatically tests the impact of each phrase in a prompt by generating images with one phrase omitted at a time.
Custom Nodes (0)
README
Prompt Tester Node for ComfyUI
The Prompt Tester is a custom ComfyUI node that helps analyze the influence of individual phrases in a prompt. It splits a prompt into components and generates variations with each phrase removed, allowing easy comparison of their impact on generated outputs.
Features
- Automatically splits prompts based on a customizable delimiter.
- Optionally includes a full-prompt baseline for comparison.
- Labels each prompt variation clearly for easy tracking.
- Output is structured for batch generation and side-by-side evaluation.
Installation
-
Locate your ComfyUI custom nodes folder
-
Clone or download this node into its own subfolder inside the custom_nodes folder. For example:
cd ComfyUI/custom_nodes git clone https://github.com/drphero/comfyui_prompttester.git
-
Restart ComfyUI to load the new node.
Usage
-
Node Name in UI:
Prompt Tester
(found underutils/prompting
) -
Inputs:
prompt
(string, multiline): The full text prompt you want to test.delimiter
(string): The character or word used to split the prompt into parts (default is comma,
).include_baseline
(boolean): Whether to include the original full prompt as the first item in the output list.
-
Outputs:
prompts
(list of strings): Each string is a prompt variation with one phrase removed.labels
(list of strings): Each label corresponds to the phrase omitted in that variation (or "Baseline Full Prompt").
Example
<img src="images/example.png" width=960/>Input Prompt:
blurry, low quality, jpeg artifacts, ugly, text, watermark, signature
Delimiter: ,
Output Prompts:
blurry, low quality, jpeg artifacts, ugly, text, watermark, signature
(baseline)low quality,jpeg artifacts,ugly,text,watermark,signature
blurry,jpeg artifacts,ugly,text,watermark,signature
blurry,low quality,ugly,text,watermark,signature
blurry,low quality,jpeg artifacts,text,watermark,signature
blurry,low quality,jpeg artifacts,ugly,watermark,signature
blurry,low quality,jpeg artifacts,ugly,text,signature
blurry,low quality,jpeg artifacts,ugly,text,watermark
Output Labels:
Baseline Full Prompt
blurry
low quality
jpeg artifacts
ugly
text
watermark
signature
Use Cases
- Prompt debugging and optimization.
- Finding which part of a prompt contributes most to visual output.