ComfyUI Node

Save LoRA

Turn an in-memory merged LoRA into a real file

By ntc-ai·Created 3 years ago·Updated 2 years ago· 38
Save LoRA
  • LoRA
    filename_prefixLoRAs/ComfyUI

    Merging LoRAs in the graph is fast, but re-running the merge every generation is a waste - and it bakes the same random dropout into every image unless you babysit the seed. Save LoRA is the "commit" step: it takes the in-memory LoRA from DARE Merge LoRA Stack and writes it to disk as a real .safetensors, so the next time you just load it with the stock LoraLoader like any other LoRA.

    It's a one-shot terminal node. Feed it a LoRA and a filename_prefix, and it dumps the merged weight dict to ComfyUI's output directory using the same counter scheme SaveImage uses: the default prefix LoRAs/ComfyUI lands in output/LoRAs/ComfyUI_00001_.safetensors. Change the prefix to LoRAs/DARE and you get output/LoRAs/DARE_00001_.safetensors. Subfolders work, so you can keep merged files out of the way of your downloaded ones. The node has no outputs - it's an output node, the end of the line.

    Why this beats leaving the merge live in the graph:

    • Speed. The merge loads every source LoRA and shuffles tensors each run. Bake once, apply from disk.
    • Reproducibility. A saved file is a fixed artifact. A live merge depends on p, scale and the seed, all of which are easy to nudge by accident and hard to spot later.
    • Portability. The result is a normal LoRA file. Anyone can drop it in models/loras and use it with the core loader, no custom nodes needed.

    One thing worth knowing before you save: the file captures the merge exactly as computed, including whatever spectral-norm normalization DARE applied when scale was positive. That's usually what you want - it's the tuned result - but it also means the saved file inherits the pack's experimental behavior. Don't expect a DARE-merged LoRA to behave like a hand-trained one; it's a weight blend, with the usual merge caveats (can lose coherence, and it's architecture-bound - a merged SDXL LoRA is SDXL-only, no Flux magic).

    Install

    Save LoRA ships in the same pack as the rest of the DARE workflow, so installing once covers all three nodes:

    • ComfyUI Manager: search the pack title "ComfyUI - Apply LoRA Stacker with DARE" and install.
    • Manually:
      cd ComfyUI/custom_nodes
      git clone https://github.com/ntc-ai/ComfyUI-DARE-LoRA-Merge
      Then restart ComfyUI. No requirements.txt, no extra pip installs, no model downloads - the pack runs on what ComfyUI already ships (torch, safetensors).

    Troubleshooting

    The file isn't where you expect it? Check ComfyUI/output first - Save LoRA writes there, not into models/loras. If you want it to appear alongside your downloaded LoRAs, copy it over after saving, or point the prefix at a subfolder you sync. Also worth knowing: the community has flagged that this merge pipeline doesn't play nicely with every model family - there are reports of it simply not working with certain bases, which tracks with the author calling the whole thing an experiment. If the saved file produces garbage on your checkpoint, it's usually the merge, not the save.

    Categoryadvanced/model_merging

    Inputs (2)

    NameTypeDefaultDescription
    LoRALoRA
    filename_prefixSTRINGLoRAs/ComfyUI

    Outputs (0)

    No outputs