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

Prompt Styles Import

Bring a style library in — including your old A1111 styles.csv

By WASasquatch·Created 3 years ago·Updated 4 days ago· 1,844
Prompt Styles Import
    • names
    • imported
    • total
    file
    mode

    The style library is only as good as the day you finally sit down and move your good prompts out of your head and into a file. Prompt Styles Import is the node that reads such a file into the library - a .json library or an AUTOMATIC1111 styles.csv with name, prompt and negative_prompt columns - and the styles land in Prompt Styles Selector's menu the moment it runs.

    The A1111 compatibility is the sleeper feature. If you've got years of styles.csv sitting in an AUTOMATIC1111 install, this node is the official-feeling path to bring them into ComfyUI without retyping a single pair. The .csv format WAS Node Suite exports and imports is the same three-column table A1111 writes, so the migration is genuinely two nodes: export on one machine, import on the other.

    What it reads and how merging works

    file is a dropdown listing every .json and .csv file in ComfyUI's input, output and temp folders - drop your file somewhere ComfyUI can see it and it appears in the menu. The mode input decides the merge policy:

    • add to the library - keeps the styles already saved here and adds the file's. New names come in; name collisions are resolved in favor of the incoming file.
    • replace the library - leaves the library holding only what the file names.

    Importing the same file again brings the library up to date: styles the file no longer names are dropped, while every style you saved locally that the file never mentions is kept. So re-importing isn't a duplicate machine - it's a sync, and a safe one.

    Outputs

    names is every style name in the library after the import, in library order (feed it to Text List to Text for a readable inventory). imported is how many styles the file held, and total is how many the library holds afterwards - the gap between the two tells you at a glance whether this was an add or a replace and how much survived.

    The honest gotchas

    The file is picked from ComfyUI's folders, and importing is not the same as editing: the imported styles live in the library (was_state.db), so you don't need to keep the file around afterward. But if you do keep a styles.json in the pack's config directory, the pack reads it into the library each time it changes - so a file you're also hand-editing can override an import. Know which mechanism you're using.

    Also: an A1111 styles.csv stores prompt strings only - whatever sampler or settings habits you had over there don't transfer, which is fine, because they wouldn't mean anything here anyway.

    Installing

    Part of 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+, Python 3.10+, and no extra packages - the v3 rewrite stripped the pack back to ComfyUI's own runtime, ending the old v2 suite's history of dependency breakage on updates.

    The natural loop: import your A1111 library once, prune it with Style Save's overwrite, and keep a current copy on disk with Prompt Styles Export.

    CategoryWAS Suite/Text/Styles

    Inputs (2)

    NameTypeDefaultDescription
    fileCOMBOWhich style file to read. The menu lists every .json and .csv file in ComfyUI's input, output and temp folders and in any folder added under paths.allow_read in config.yaml, each labelled with the folder it sits in.
    modeCOMBO`add to the library` keeps the styles already saved here and adds the file's. `replace the library` leaves the library holding exactly what the file holds, dropping every other style.

    Outputs (3)

    NameTypeDescription
    namesARRAYEvery style name in the library after the import, in library order. Text List to Text turns it into one line per name.
    importedINTHow many styles the file held.
    totalINTHow many styles the library holds after the import.