Save LoRA Model(merge)
Turn a merged LoRA back into a file — and know exactly where it lands
- merged_model
- saved_path
The merge node hands you a big pile of tensors in memory. This node is what turns that pile back into a .safetensors file you can actually use, share, or load in any other workflow. It's the last stop in this pack's pipeline: OnlyLoadLoRAsModel → MergeLoRAsKohyaSSLike → Save LoRA Model(merge). Without it, your on-the-fly merge evaporates when the workflow ends.
The community frames the choice as "merge on the fly in ComfyUI, or use kohya to merge permanently into a file." This node is the permanent option done inside ComfyUI - no command line, no separate Python script, just a file you can drop back into any loader the next time you open ComfyUI.
Where it saves
Default behavior: if you give it a bare filename like merged_lora.safetensors, it writes to ComfyUI/models/loras/merged-loras/ and creates that folder if needed. That's a deliberate choice - it lands inside the standard LoRA folder, so your merged result shows up immediately in the lora_name dropdown of every normal loader, including ComfyUI's built-in one. If you pass an absolute path instead, it writes exactly there and skips the default folder entirely.
Under the hood it picks the writer by extension: .safetensors goes through the safetensors library, anything else falls back to torch.save. So name your file with the extension you actually want - and if you want a checkpoint-style output instead, remember this is a LoRA saver, not a checkpoint saver.
Inputs and output
merged_model- the state dict fromMergeLoRAsKohyaSSLike(or anywhere else you produce a raw LoRA dict).modeloutput- the filename or absolute path. Defaultmerged_lora.safetensors.
Output: saved_path, a STRING holding the absolute path the file was written to. The pack's own example workflow wires this into a ShowText node so you can see where it went without digging through folders. Handy.
Installing
Same story as the rest of the pack - no models to download, no heavy dependencies:
cd ComfyUI/custom_nodes
git clone https://github.com/LingSss9/comfyui-merge
Restart ComfyUI (or install "comfyui-merge" via ComfyUI Manager). If your environment lacks safetensors, .safetensors writes fail with an import error; pip install safetensors into ComfyUI's env sorts it.
Troubleshooting
- The file is ~1 KB. That's a near-empty state dict - the merge upstream was empty, almost always because you fed
MergeLoRAsKohyaSSLikereal models instead of the raw dicts fromOnlyLoadLoRAsModel, or every merge weight was 0 (model3/model4 default to 0 and get dropped). Fix the wiring, not this node. - Where did it go? Check
models/loras/merged-loras/. If you used a relative name that's the folder; absolute paths go wherever you pointed them. - File already exists? Nothing here will overwrite it politely - save under a new name to avoid clobbering work you wanted to keep. (The merge node lists an
allow_overwritetoggle, but the shipped code doesn't actually implement it, so don't count on it.)
One more honest note: this is a small, mostly-dormant pack, so verify your merged output works before you rely on it - load it back in a normal LoraLoader with a known checkpoint and a fixed seed, and compare against the stacked version. That two-minute sanity check catches most silent merge mistakes.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| merged_model | MODEL | — | |
| modeloutput | STRING | merged_lora.safetensors | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| saved_path | STRING | — |