Nodes/ComfyUI_Dynamic_TagLoader/💾 Dynamic Tag Saver
ComfyUI Node

💾 Dynamic Tag Saver

Save prompts and LoRAs straight into your tag library

By NineKey1028·Created 8 months ago·Updated 5 days ago· 4
💾 Dynamic Tag Saver
    • saved_info
    text
    folder_namenew_folder
    filenamemy_prompt
    lora_settings{}

    ⚡Dynamic Tag Loader is the read side of a tag library; 💾 Dynamic Tag Saver is the write side. Paste or type a prompt, and it lands as a .txt file inside the pack's tags folder, formatted so the loader can read it back and cross-multiply it with everything else. If you've ever wished you could just save the prompt that produced a good image, this is the button for it.

    How it works

    The node takes your text, trims the edges, and appends any LoRAs you've selected as <lora:name:strength> lines. Then it sanitizes the folder and filename (alphanumerics, spaces, _, - and . survive; everything else is stripped), auto-creates the folder under tags/, and writes the file. The important safety detail: it never overwrites. If my_prompt.txt already exists, it silently becomes my_prompt_1.txt, then _2, and so on. You can hammer the save button as much as you like.

    The three inputs you actually set:

    • text - the prompt itself (multi-line is fine).
    • folder_name - the subfolder under tags/ to save into (default new_folder; created if missing).
    • filename - the output file name (default my_prompt; .txt is appended if you omit it).

    There's a hidden lora_settings JSON input, but like the loader's tag_settings, you don't hand-edit it - the bundled UI builds it. In the node's panel you get a "+ Add LoRA" picker that lists your installed LoRAs (served from ComfyUI's loras folder via the pack's backend route), a strength slider running from -10.0 to 10.0, and a right-click menu to reorder or delete entries. On save, the selected LoRAs are converted to standard <lora:...> syntax and appended after a newline.

    It's an output node, so the result shows up in the UI as a status string rather than a wire you plug in. The single saved_info output is that report: saved filename, folder, and a content preview.

    Why you'd actually use it

    The loop that makes this worth having: you hand-write a prompt in the saver, save it to a folder like characters/ or styles/, and from then on the loader treats it as one option in a tag group. Build up a library of character tags, pose tags and style tags over time, and your batch generator gets richer with zero extra effort - every file you save is another combination the loader can produce. It's also a clean way to capture a winning prompt mid-workflow and drop it into a .txt before you forget it.

    The honest caveats

    Where files land matters. The saver writes into ComfyUI/custom_nodes/ComfyUI_Dynamic_TagLoader/tags/ - the pack's directory, not your models folder. If you ever uninstall or wipe the custom node, your carefully built tag library can go with it. Back up that tags folder before any cleanup. That's the one foot-gun in an otherwise simple node, and the README doesn't emphasize it.

    Install

    Same pack as the loader, so one clone covers everything:

    cd ComfyUI/custom_nodes/
    git clone https://github.com/NineKey1028/ComfyUI_Dynamic_TagLoader.git
    

    Restart ComfyUI and you're done - no extra Python dependencies, no model downloads, nothing else to configure.

    CategoryCustom/TagLoader

    Inputs (4)

    NameTypeDefaultDescription
    textSTRING
    folder_nameSTRINGnew_folder
    filenameSTRINGmy_prompt
    lora_settingsSTRING{}

    Outputs (1)

    NameTypeDescription
    saved_infoSTRING