Nodes/ComfyUI Prompt History Node/Prompt History (CLIP Text Encode)
ComfyUI Node

Prompt History (CLIP Text Encode)

A CLIP Text Encode that actually remembers every prompt you've run

By ardadmrknn·Created 10 months ago·Updated 9 months ago· 4
Prompt History (CLIP Text Encode)
  • clip
  • CONDITIONING
history_namedefault
text

Every ComfyUI user knows the feeling: you nail a prompt at 2am, close the tab, and the exact wording is gone. ComfyUI's own history only keeps the workflow JSON, which means digging it back out involves unrolling an escape-hatched blob to find the text field. Prompt History (CLIP Text Encode) solves that by being the CLIP Text Encode node you already use, just with a memory.

It's a drop-in replacement for the core CLIPTextEncode node. Same clip input, same text box, same CONDITIONING output - but every prompt you run gets saved to a browsable history with its thumbnail and workflow metadata attached. Think of it as a mini prompt library that you build by accident, just by generating normally.

How it works

The Python side is deliberately boring: encode() does the exact same thing the stock node does - clip.tokenize(text) then encode_from_tokens with the pooled output packed into the conditioning - so your results are identical to stock. The magic lives in two layers around that. First, the node writes your prompt text to a JSON file on every execution. Then a JavaScript extension listens for ComfyUI's execution_start event (grabbing the prompt and a serialized snapshot of the whole workflow) and its executed event (grabbing the first generated image), and posts both back to the node's own HTTP routes to attach to that entry. You get the prompt saved even if generation fails; the image arrives once the queue actually finishes.

History files land inside the pack's own folder: custom_nodes/comfyui-history-clip-text-encode-node/prompt_history/prompt_history_<name>.json, with thumbnails in a thumbnails/ subfolder. Entries are deduped by exact prompt text, so rerunning the same prompt updates its timestamp and thumbnail instead of stacking duplicates.

The inputs that matter

  • text - your prompt, multiline. Same as any CLIP Text Encode.
  • history_name - groups prompts into separate history files. It auto-fills from your workflow's filename when you create the node, which is genuinely clever: each .json workflow gets its own prompt archive without you lifting a finger. Override it to manually group prompts across workflows.
  • clip - the CLIP model from your checkpoint/loader. Standard.
  • Output: CONDITIONING - wire it into the sampler exactly like you would from a normal CLIP Text Encode.

Then there's the "View History" button on the node, which opens a modal where you browse saved prompts, favorite the good ones and filter to see only those, click a thumbnail to view full-size, and delete a prompt or just its thumbnail.

Installing it

No extra dependencies - the pack ships with only Python stdlib plus aiohttp, which ComfyUI already bundles. No model downloads. Clone it, restart, done:

cd ComfyUI/custom_nodes
git clone https://github.com/ardadmrknn/comfyui-history-clip-text-encode-node

Restart ComfyUI and add it via Add Node ▸ Utilities ▸ Prompt History (CLIP Text Encode). If you use ComfyUI Manager, the README's note that it's listed "soon" is a hint it might not appear in Manager's default search yet - if it doesn't, use Manager's Install via Git and paste the repo URL.

Where you'll get burned

The big one: your prompt history lives inside the custom node's folder, not in ComfyUI's output directory. Update or reinstall the pack and your archive goes with it. If your prompts matter, back that prompt_history/ folder up.

Also keep in mind the thumbnail capture is a frontend affair - the "first generated image" is caught by the browser-side listener. Queue a workflow from the API or a remote client and the prompt saves, but the thumbnail doesn't until a live UI session runs it. And if you're comparing tools: it's a lighter-weight cousin of packs like PG-Nodes' Lazy Prompt or the utilities in rgthree-comfy, but its whole selling point is that it replaces the stock node rather than sitting beside it. For a single-node drop-in that costs nothing to run, that's a decent trade.

CategoryUtilities

Inputs (3)

NameTypeDefaultDescription
clipCLIP
history_nameSTRINGdefault
textSTRING

Outputs (1)

NameTypeDescription
CONDITIONINGCONDITIONING