Nodes/ComfyUI-Prompting-System/๐Ÿ’พ Prompt Saver
ComfyUI Node

๐Ÿ’พ Prompt Saver

A prompt library that lives inside ComfyUI

By danieljanataยทCreated 8 months agoยทUpdated 8 months agoยท 0
๐Ÿ’พ Prompt Saver
    • text
    โ—„textโ€”โ–บ
    โ—„saver_idโ–บ
    โ—„categorynoneโ–บ
    โ—„modelnoneโ–บ
    โ—„tagsโ–บ

    You know the feeling: you generated something great three weeks ago and the exact prompt is gone. Or worse, you have it, but it's buried in a notes file you'll never reopen. ๐Ÿ’พ Prompt Saver is the persistence side of this pack's answer - it saves prompt text into a local, searchable library you can browse right inside ComfyUI. It fills a genuinely weird gap in the ecosystem: everyone talks about prompt engineering, almost nobody gives you a place to keep the prompts you already wrote.

    How it works

    Every time the node runs, it writes your text into a JSON database at ComfyUI-Prompting-System/data/prompts.json, alongside a hash of the prompt, an optional model, a category, comma-separated tags, a rating, a thumbnail, and timestamps. All of that shows up in the pack's "PS" sidebar tab: search, filter by category/model/tag, star-rate prompts 1โ€“5, edit, delete, and export or import the whole library as JSON. There's even automatic thumbnail capture - after a run, the pack looks for an image written to your output folder in the last 30 seconds and attaches a 64px preview to whatever you just saved. So your library ends up looking like a grid of your own generations, not a wall of text.

    The gotcha that will bite you

    The save logic is per-saver overwrite. Each saver_id remembers the last prompt it saved - save again with the same saver_id and it overwrites that previous entry rather than adding a new one. If you save a prompt, tweak one word, and re-run, you've updated the same library entry and bumped its used_count. That's the intended loop, but if you want a genuinely new entry you have to reset the saver - via the Smart Text node's buttons or by calling POST /ps/reset-last-saved. Same-text prompts also collapse into one entry (matched by hash), so your library stays deduped without you doing anything. It's a small state machine hiding behind a save button; worth knowing before you wonder why nothing new appears.

    Inputs and outputs

    The only required input is text, and it's a forced input - wire it from a text node rather than typing in place. saver_id is optional and also forced; it's what makes per-saver tracking work, and the pack's Smart Text node hands you its own ID for exactly this. category and model are dropdowns populated from the database, showing "none" until you add entries in the sidebar. tags is a comma-separated string that gets stacked onto the entry, lowercased, without replacing existing tags. The single output is text, a straight pass-through so the node can sit at the end of a branch without breaking the flow - it's an output node, so it can terminate one.

    The natural pairing

    Use it alone with any text source, or the intended way: PS_SmartText โ†’ PS_PromptSaver, wiring saver_id to saver_id. The Smart Text buttons then handle the reset for you, and your library fills with clean, thumbnailed entries that you can star, filter, and pull back out next week.

    Installing

    Part of the ComfyUI-Prompting-System pack. In ComfyUI Manager, search "ComfyUI-Prompting-System" and install, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/danieljanata/ComfyUI-Prompting-System
    

    Then restart ComfyUI. No requirements.txt, no models to fetch - the pack runs on what ComfyUI already ships. One thing to do early: since the whole library is a single JSON file, back it up (or export it from the sidebar) before you get a hundred prompts in. The pack is new and single-author, so treat your data as the precious thing it is.

    CategoryPrompting-System

    Inputs (5)

    NameTypeDefaultDescription
    textSTRINGโ€”
    saver_idoptSTRINGโ€”
    categoryoptCOMBOnone1 options: none
    modeloptCOMBOnone1 options: none
    tagsoptSTRINGโ€”

    Outputs (1)

    NameTypeDescription
    textSTRINGโ€”