Nodes/ComfyUI Text Processor/Text Storage (Writer)
ComfyUI Node

Text Storage (Writer)

Save text that outlives the run — the pack's persistent clipboard

By rookiestar28·Created 10 months ago·Updated 10 days ago· 16
Text Storage (Writer)
    • passthrough_text
    text_input
    filename_prefix
    save_nameMy_Data
    mode
    storage_formatjson

    Text in ComfyUI is ephemeral by default. A node produces a string, it flows through the graph, and when the run ends it's gone - unless you built a save step. Text Storage (Writer) is that save step: a persistent text store for anything you want to keep and reuse later, read back by its sibling Text Storage (Reader).

    The workflow that made this node exist, per the author's own history: a single "Text Storage" node that tried to both save and load was confusing enough that users couldn't figure out how to save at all. The fix was splitting it into a dedicated writer and reader, and this is the writer half. It's the "remember this for me" node - store a polished base prompt, a reusable negative, a snippet of context, and any workflow can pull it back up later.

    How it works

    Three things define an entry:

    • text_input - the content (multi-line).
    • save_name - the entry's name. Supports time formatting (%Y-%m-%d) and wildcards (*** for an auto-incrementing counter), so you can generate timestamped or numbered entries.
    • filename_prefix - an optional grouping prefix, e.g. ProjectA_, that keeps related entries together.

    Then mode decides what happens:

    • Add New (Auto Rename) - writes the entry, and if the name collides it renames automatically (like Log_2026-08-13_001.txt) instead of overwriting. The safe default for log-style saves.
    • Overwrite Existing - replaces the named entry. What you want when the entry is a fixed slot ("my current base prompt") rather than a history.
    • Delete - removes it.

    storage_format picks the backing store: json puts the text inside the pack's text_storage.json database; txt writes a standalone .txt file you can open and edit externally. Current installs store under the ComfyUI user directory, with legacy plugin-local entries still readable.

    The output is passthrough_text - the same text you put in, returned so the node doesn't have to sit at the end of a chain. You can save and keep the flow going.

    Install

    It lives in ComfyUI Text Processor:

    cd ComfyUI/custom_nodes
    git clone https://github.com/rookiestar28/ComfyUI_Text_Processor.git
    pip install -r requirements.txt
    

    Restart, or Manager → "ComfyUI Text Processor" → Install.

    Gotchas

    The pairing rule: the Reader builds its dropdown when it loads, so a freshly saved entry needs a page refresh (F5) before the Reader sees it. Not a bug - documented behavior, just remember it when you're mid-flow. Also, Delete ignores text_input content (there's nothing to save), so don't be confused when wiring it up. If you mostly want a versioned history, leave the mode on Add New; if you want a stable slot that always holds the latest, Overwrite is the one. Getting those two mixed up is the whole failure mode here.

    CategoryComfyUI Text Processor

    Inputs (5)

    NameTypeDefaultDescription
    text_inputSTRINGText to store and pass through; Delete mode ignores its content.
    filename_prefixSTRINGOptional prefix added before the saved entry name.
    save_nameSTRINGMy_DataLogical name of the entry to add, overwrite, or delete.
    modeCOMBOAdd with collision-safe renaming, overwrite the named entry, or delete it.
    storage_formatCOMBOjsonStore the entry in the JSON collection or as an individual text file.

    Outputs (1)

    NameTypeDescription
    passthrough_textSTRINGPassthrough copy of the text input.