Nodes/ComfyUI-A5Nodes/A5Prompt Database
ComfyUI Node

A5Prompt Database

Three shelves for the prompts you keep retyping

By A5Projects·Created 3 days ago·Updated 3 days ago· 1
A5Prompt Database
    • text
    name
    prompt

    The prompt you finally got right is currently living in an old generation, or in a Discord message to yourself, or in a text file called prompts2.txt. This node puts a name on it, saves it inside your ComfyUI install, and gives it back as a string.

    Three categories, one file, output-only. It's the sibling of the pack's note node, and it's the one you'll actually use every session.

    What it is

    Save named text entries under System, Image, or Video. Each category has its own dropdown of saved prompts, six quick buttons for recent entries, load/delete buttons, and an export to a .txt file. Hovering a name shows the full text in a tooltip, which is how you tell two similar prompt titles apart.

    Because the storage is in the node's folder rather than in the workflow, your prompt library follows your ComfyUI install, not the graph. Open any workflow, drop the node, and every prompt you ever saved is there.

    And nothing stops you using it for non-prompts. Negatives, LoRA trigger words, a phrase you're testing across five seeds - it's just named text.

    The mechanics

    The update rule is the whole interface, and it's the same one the author uses in his note node:

    • Same name → the entry is overwritten. That's your edit-and-save path.
    • New name → a new entry. So renaming a saved prompt and hitting Save duplicates it instead of moving it.

    On the Python side this node is almost nothing. It describes name and prompt, and get_prompt returns the prompt string. The real work happens in the node's UI, which calls HTTP routes the pack registers with ComfyUI's server - that's why saving works the moment you click, without queueing a generation, and why delete-all and export exist as buttons rather than as graph operations.

    Writes go through a temp file and an atomic replace, so a hard crash mid-save doesn't leave you with a half-written database.

    Inputs and outputs

    • name - the key, and what the UI uses to find the entry to load.
    • prompt - a multiline STRING. Note that dynamic prompts are off on this widget; {a|b} syntax is not being expanded here, it's just text.

    One output: text, a STRING. Straight into a CLIP Text Encode, a second enhancer, or anywhere else that takes a string. All it really does is echo the prompt value when the graph runs - the database is a library, not a transform.

    That's worth understanding before you build around it: the node doesn't inject anything at execution time. What flows downstream is whatever is in the prompt box when the graph runs, and the buttons are what put a saved prompt into that box.

    Installing it

    cd ComfyUI/custom_nodes
    git clone https://github.com/A5Projects/ComfyUI-A5Nodes
    

    Restart ComfyUI, hard-refresh the browser. Or search A5 Custom Nodes in ComfyUI Manager and take the numbered version rather than Nightly. Zero Python dependencies, zero downloaded models. It's one of nine nodes in the same pack, so this install is the one you'd be doing anyway. If you have the old standalone versions lying around, disable them - the pack deliberately reuses the original node IDs so old workflows still load, and duplicates will collide.

    The node's UI is JavaScript-driven, so the pack's browser note applies: classic node mode in Firefox; if Nodes 2.0 scrambles the layout, reload the node from its context menu.

    Where people get burned

    Your library is inside custom_nodes. It's custom_nodes/ComfyUI-A5Nodes/comfyui_A5Prompt_database/a5prompt_database.json. Normal updates leave it alone, and the pack's .comfyignore keeps it out of version control, so it won't be committed or overwritten by a pull. But reinstalling the pack replaces the folder. If that file matters to you, copy it somewhere dull and safe now.

    It's plain text on disk. The README says so explicitly. Fine for prompts, wrong place for anything secret.

    The name field is load-bearing. Two prompts called "portrait" in the same category are one prompt. And because a renamed entry saves as a new one, tidy-up means deleting the old copy manually.

    Prompt habits move fast. If you're on an LLM-encoded model, your masterpiece, best quality boilerplate is inert and your attention weights are being discarded - so a library full of 2023 tags is a library of noise. Prune it occasionally; the export button makes that a five-minute job in a text editor.

    Categoryutils/text

    Inputs (2)

    NameTypeDefaultDescription
    nameSTRING
    promptSTRING

    Outputs (1)

    NameTypeDescription
    textSTRING