Prompt Manager
Your text encoder, but it never forgets a prompt you typed
- clip
- CONDITIONING
- STRING
The text encoder that keeps receipts
Every ComfyUI regular has had the moment: you spend an hour on a seed, a LoRA, and a prompt you're sure you'll never replicate, land something great, close ComfyUI - and it's gone. Prompt Manager is the standard CLIPTextEncode node with that problem removed. You use it exactly like the stock node - drop in a CLIP model, type your prompt, get CONDITIONING out - but every prompt you run through it is automatically saved to a local SQLite database, along with categories, tags, and the image that came out of it.
It's a text-encoder replacement, so it speaks the language your sampler already speaks. The encoder turns your words into the conditioning vectors the diffusion model cross-attends to, and this node sits right on that path. Feed it clip from a checkpoint or CLIP loader, wire the CONDITIONING output into KSampler's positive or negative input, done. The database is the actual product here. The web dashboard at http://localhost:8188/prompt_manager/admin becomes your searchable prompt history: text search, category filters, and a gallery showing the images each prompt produced.
How it works
Under the hood it's a thin wrapper around the same CLIP encoding ComfyUI does natively, with bookkeeping bolted on. On a run it joins prepend_text + text + append_text into one string, encodes it, and saves the original text to SQLite. Identical prompts are caught by a SHA256 hash - the same prompt run twice updates the existing row's metadata instead of creating a duplicate. The trickier part is image linking: a monitor watches your output folder and attaches newly generated images to the prompt that was active when they were written, which is what makes the dashboard's filmstrip thumbnails work.
Two inputs are required: text (multiline, and dynamic-prompt syntax like {red|blue} works here) and clip. The optional ones are worth explaining because they're the point:
category- free-text, e.g.portraits. Use it; it's how you'll filter later.tags- comma-separated, e.g.anime, detailed.prepend_text/append_text- text joined around your main prompt before encoding.search_text- this widget exists on the node, but it doesn't change what gets encoded. The real searching lives inPromptSearchListand the dashboard.
Outputs: CONDITIONING (into your sampler) and STRING - the fully combined text that was encoded, handy if you want to display it or feed it somewhere else.
Installing it
Two ways, same result:
cd ComfyUI/custom_nodes
git clone https://github.com/ComfyAssets/ComfyUI_PromptManager
cd ComfyUI_PromptManager
pip install -r requirements.txt
or just search "Prompt Manager" in ComfyUI Manager. Restart ComfyUI either way. Dependencies are light - watchdog and Pillow, both usually already present in a ComfyUI environment. The core nodes need no model downloads; the optional AI AutoTag feature (WD14/JoyCaption) pulls its models on first use from the dashboard, and only if you switch it on.
Things that trip people up
The most common error is a hard clip input is invalid - that's the node telling you the checkpoint you loaded doesn't contain a usable text encoder. Swap the checkpoint or load CLIP properly. Second, don't expect one DB row per run: dedup by hash means unchanged prompts don't pile up, and if you edit a prompt you get a new row. Third, a database write failure logs a warning but never kills your render - the image still generates. The DB lands as prompts.db in the extension folder (the README mentions example_prompts.db, but the shipped code configures prompts.db, and you can relocate it via a config.json with database.default_path). Back it up if your prompt history matters - that's the whole point of this node.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | The text prompt to be encoded and saved to database. | |
| clip | CLIP | The CLIP model used for encoding the text. | |
| categoryopt | STRING | Optional category for organizing prompts (e.g., 'landscapes', 'portraits') | |
| tagsopt | STRING | Comma-separated tags for the prompt (e.g., 'anime, detailed, sunset') | |
| search_textopt | STRING | Search for past prompts containing this text | |
| prepend_textopt | STRING | Text to prepend to the main prompt (connected STRING nodes will be added before the main text) | |
| append_textopt | STRING | Text to append to the main prompt (connected STRING nodes will be added after the main text) |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| CONDITIONING | CONDITIONING | A conditioning containing the embedded text used to guide the diffusion model. |
| STRING | STRING | The final combined text string (with prepend/append applied) that was encoded. |