Nodes/comfyui-character-suite/πŸ’Ύ Save Prompt Segment
ComfyUI Node

πŸ’Ύ Save Prompt Segment

Save That Prompt Look Before You Lose It

By DrkSun81Β·Created 2 months agoΒ·Updated 27 days agoΒ· 0
πŸ’Ύ Save Prompt Segment
    • status
    β—„prompt_textβ–Ί
    β—„categoryclothingβ–Ί
    β—„labele.g. school uniform casualβ–Ί

    You just dialed in a killer clothing combo - thighhighs, pleated skirt, blazer - and the render came out great. In three weeks you'll want it again and you'll have to reconstruct it from memory. Save Prompt Segment from the comfyui-character-suite pack is the "write it down" node: it stores any prompt string as a named, categorized entry in a persistent library, so the next prompt can load it back with one dropdown.

    It's the write side of the suite's segment loop. Save here, load with SegmentLoader, browse with SegmentBrowser. Three nodes, one plain-JSON library in data/segments.json inside the pack folder.

    How it works

    You give it three things:

    • prompt_text - the prompt content to save (it's a linkable input, so you can wire final_positive from Prompt Builder straight in).
    • category - one of the ten fixed buckets: quality, style, character, hair, clothing, action, pose, scene, lighting, misc. No freeform categories here - the whole suite shares this taxonomy, and it keeps the library sortable.
    • label - your human name for it, like plate armor fantasy. This is what you'll type into SegmentLoader later, so make it memorable.

    Saving with the same category + label combination overwrites the previous entry - it's an upsert, not an append. So re-saving "school casual" with tweaked tags updates it in place instead of piling up duplicates. That's the feature you'll love until you overwrite something you wanted; labels are case-insensitive for the match, so School Casual and school casual collide.

    The single output, status, is a confirmation string - "βœ“ Saved 'plate armor fantasy' to [clothing] (12 total)" or "βœ“ Updated …". It's an output node, so the status appears in the UI after the run, and you can wire it to a Show Text node if you want it visible in the graph. If the prompt or label is empty, it saves nothing and tells you so.

    Installing it

    cd ComfyUI/custom_nodes/
    git clone https://github.com/DrkSun81/comfyui-character-suite
    

    Restart, find it under CharacterSuite (or ComfyUI Manager β†’ search "character suite"). No pip dependencies - stdlib only. Python 3.9+.

    Where people get tripped up

    • Your library lives in the pack folder. data/segments.json is plain JSON - safe to hand-edit and back up, but it also means wiping or updating the custom node folder carries your library with it. Back the file up if you care about it; it's a single small JSON.
    • Save the thing you actually rendered, not the thing you wish you rendered. Since you can wire final_positive in directly, the natural move is to save post-Prompt-Builder output - the fully assembled prompt, which is exactly what reproduced the image.
    • Segments are text, not weights. A saved segment recreates the tags that made the look; the exact render depends on seed, checkpoint, and sampler. If you need pixel-perfect reproduction, save the image and its embedded workflow, not just the prompt.
    • Overwrite is silent-ish. You get a status string saying "Updated", but there's no undo. If you're nervous, browse the library before you re-save.

    The habit is worth forming: any time a render's prompt has a reusable piece - a lighting recipe, a pose, an outfit - save it the moment it works. That's the entire point of the suite's segment system, and this is the node that feeds it.

    CategoryCharacterSuite

    Inputs (3)

    NameTypeDefaultDescription
    prompt_textSTRINGβ€”
    categoryCOMBOclothing10 options: quality, style, character, hair, clothing, action, +4
    labelSTRINGe.g. school uniform casualβ€”

    Outputs (1)

    NameTypeDescription
    statusSTRINGβ€”