Nodes/ComfyUI_NoxinNodes/Save to Noxin Prompt Library
ComfyUI Node

Save to Noxin Prompt Library

Put that prompt you keep retyping into the library

By noxinias·Created 3 years ago·Updated 2 years ago· 12
Save to Noxin Prompt Library
    • STRING
    newprompt
    librarynum1
    saveprompt

    NoxinPromptSave is the write side of the pack's prompt library, and it's the node that makes NoxinPromptLoad worth having. Type a prompt into the multiline box, pick which of the six library slots it goes in, flip saveprompt to on, and it appends your text to a file in the pack's library/ folder. Next time the Load node refreshes, that prompt is a dropdown entry. It's the "save for later" habit made into a node.

    The mechanism is deliberately plain. newprompt is a string, librarynum picks promptlibrary1.txt through promptlibrary6.txt (an int, 1–6), and saveprompt is your on/off switch. When it runs with saving enabled, it reads the target file, checks for an exact duplicate, and only then appends newprompt plus a newline. If the prompt already exists it prints Noxin Prompt Save: Prompt already exists to the console and touches nothing. Empty input, and the literal string Empty Library, are both ignored. The node is marked as an output node (OUTPUT_NODE), and it returns the same string it was given - so you can save a prompt and keep using it in the same pass, feeding its STRING output straight into a CLIP Text Encode.

    The three inputs you actually set: newprompt (multiline - paste your whole prompt or negative), librarynum (which slot, keep it between 1 and 6 so the Load node's dropdowns see it), and saveprompt (on/off). Output: one STRING, the prompt as passed through.

    The traps are behavioural, not technical. The duplicate check is exact-match only - paste the same prompt with a trailing space or an extra comma and you get a second entry. And because the node runs on every queue pass while saveprompt is on, don't leave it on while you're iterating over variants unless you genuinely want six near-identical entries in your library. Flip it off once the prompt is saved, and your library stays clean. One more sequencing quirk shared with the Load node: the dropdowns are built at node-load time, so after saving you'll need to refresh the Load node (or restart ComfyUI) to see the new entry.

    Context: this pair is the pack's most-cited feature. Another prompt-library node's author referenced it in r/comfyui back in 2023 as "nice but" - the critique being that you need a separate save node and a shared folder rather than one tidy editor. Fair. But if you want a plain, zero-dependency prompt library that's just text files you can edit in any editor, this is the straightforward version of the idea.

    Install is the usual for this pack and genuinely light - no dependencies, no models:

    cd ComfyUI/custom_nodes
    git clone https://github.com/noxinias/ComfyUI_NoxinNodes.git
    

    Restart, find "Save to Noxin Prompt Library" under NoxinNodes. The README is upfront that the pack is young and changes often - delete the .git folder after cloning if you want a saved workflow to stay stable forever.

    CategoryNoxinNodes

    Inputs (3)

    NameTypeDefaultDescription
    newpromptSTRING
    librarynumINT11–6
    savepromptCOMBO2 options: on, off

    Outputs (1)

    NameTypeDescription
    STRINGSTRING