ComfyUI Node

Lora Save

Merge two LoRAs into one file and write it from inside the graph

By ifmylove2011·Created about a year ago·Updated 6 days ago· 3
Lora Save
  • lora_model
  • saved_path
savenamemerged_lora

Blending two LoRAs into one file is one of those jobs the community mostly does with external tools - supermerger, a Kohya script, a merge GUI - and then drags the result back into ComfyUI. LoraSaver is the save half of a three-node system that does the whole thing inside the graph: load a LoRA, merge it with another, and write the result straight to your models/loras folder as a .safetensors.

It's from comfyui-missed-tool, ifmylove2011's little utilities pack. The README calls the trio out explicitly - "Load Lora, Merge Load, and Save Lora" - and the author's own training config ships in the repo, so this is clearly a "I kept needing this" tool rather than a grand project. That's fine. It fills a real gap.

How it works

LoraSaver takes a LORA_TENSOR_DICT - a raw dictionary of tensors, not a wrapped model - and writes it to disk with safetensors.torch.save_file:

save_path = os.path.join(folder_paths.models_dir, "loras", f"{savename}.safetensors")

It's an output node: run the graph, and the merged file appears in your LoRA folder. The only other outputs are a printed path and the saved_path string.

The two inputs are both simple: lora_model (the tensor dict) and savename (default merged_lora; the .safetensors extension is appended for you).

To feed it you need the pack's LoraLoad node - it reads a LoRA file as a raw dict - and optionally LoraMerge to blend two of them with a main_weight (0–100). The merge math is a weighted sum, and mismatched tensor shapes get zero-padded to the larger size rather than projected.

Installing it

ComfyUI Manager, search comfyui-missed-tool, or by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/ifmylove2011/comfyui-missing-tool
cd comfyui-missing-tool
pip install -r requirements.txt

Then restart. Dependencies are torch, numpy, Pillow, and - a real quirk - safetensors is imported by lora_merge.py but not listed in requirements.txt. In practice this never bites because ComfyUI itself depends on safetensors, so it's already in your environment. No model downloads, no extra weights to fetch. The nodes appear under "missed-tool". And yes: the README's clone URL says "comfyui-missed-tool" while the repo is "comfyui-missing-tool" - GitHub redirects either.

Where people get burned

  • It only eats this pack's type. LORA_TENSOR_DICT is custom to comfyui-missed-tool. The built-in LoraLoader outputs a MODEL object, which LoraSaver won't accept - you must use the pack's own LoraLoad node to get the dict.
  • The saved file has no metadata. No trigger words, no base model, no alpha recorded. It'll list fine in the loras folder and in LoRA managers, but as a bare tensor dump. Name files carefully; you'll be the only memory it has.
  • The merge is a blunt instrument. Zero-padding rank mismatches and a single 0–100 weight slider is fine for blending two same-architecture LoRAs, but if you're doing careful multi-LoRA surgery, reach for a real merger instead. This is the in-graph quick-and-dirty.
  • It overwrites silently. Save over an existing name and the old file is gone, no warning. Keep a backup before you merge something you care about.

For the common "blend two style LoRAs and ship one file" job, this trio turns a multi-step external ritual into three nodes and one run. That's a genuine quality-of-life win, even if the metadata-less output demands you stay organized.

Categorymissed-tool

Inputs (2)

NameTypeDefaultDescription
lora_modelLORA_TENSOR_DICT
savenameSTRINGmerged_lora

Outputs (1)

NameTypeDescription
saved_pathSTRING