Nodes/WAS Node Suite v3/Prompt Styles Export
ComfyUI Node Runs on cloud

Prompt Styles Export

Back up your style library, or hand it to someone on an A1111 setup

By WASasquatch·Created 3 years ago·Updated 4 days ago· 1,844
Prompt Styles Export
    • path
    • styles
    root
    filenamestyles.json

    At some point your style library becomes load-bearing - months of refined prompt pairs, all of it living in one SQLite file you'd rather not lose to a bad update. Prompt Styles Export is the node that writes the whole library out to a file so you can back it up, share it, or edit it by hand. The one-input, two-output simplicity hides a genuinely useful detail: the file format is decided by the extension you choose.

    A name ending in .csv writes AUTOMATIC1111's own format - name, prompt, negative_prompt columns. Any other name writes JSON. That's the migration story in one sentence: WAS Node Suite's style library is compatible with the styles.csv every A1111 user already has, in both directions (import reads either format back). If you're switching tools and have years of styles on one side, this node is the bridge.

    What it does

    root picks which folder the file lands in - ComfyUI's own output or temp, or any folder you've added under paths.allow_write in the pack's config.yaml. filename is the name and any subfolder below root; styles.json writes a JSON library, styles.csv the A1111-compatible table.

    Outputs are path (the full path of the file written - wire it into a report or an archive node if you're automating backups) and styles (how many styles were written, so you can confirm the export actually caught everything).

    A file already at that name is replaced, which makes repeated exports idempotent - run it on a schedule, or before any risky change, and the latest library is always sitting there.

    How it fits with the rest of the pack

    • Prompt Style Save puts pairs in.
    • Prompt Styles Selector pulls them out for encoding.
    • Prompt Styles Import reads a library back in, from either JSON or an A1111 styles.csv.
    • This node is the other half of that round trip - and the reason the loop is safe. Export before experimenting with import, and a botched merge is one import away from undone.

    Installing

    Ships in WAS Node Suite v3. ComfyUI Manager → search WAS Node Suite v3, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/WASasquatch/was-node-suite-comfyui
    

    Restart after; needs ComfyUI 0.14.0+ and Python 3.10+. No packages or weights install - v3 was rebuilt to run on the torch ComfyUI already has, a deliberate break from the old v2 suite's twenty-dependency install that kept breaking on updates.

    Two honest notes. First, the file this writes is a copy - the live library stays in was_state.db, so export doesn't clear anything. Second, because it writes under output/temp by default, remember those folders can be cleaned out; if this file is your only backup, write it somewhere in paths.allow_write that survives, or copy it out periodically.

    CategoryWAS Suite/Text/Styles

    Inputs (2)

    NameTypeDefaultDescription
    rootCOMBOWhich folder the file lands in: ComfyUI's own 'output' or 'temp', or any folder added under paths.allow_write in config.yaml, listed by its own name. filename names the part below it.
    filenameSTRINGstyles.jsonName of the file, and any folder below root to put it in. styles.json writes a JSON library, styles.csv writes A1111 columns. Eg: styles/[time(%Y-%m-%d)].json

    Outputs (2)

    NameTypeDescription
    pathSTRINGThe full path of the file that was written.
    stylesINTHow many styles were written.