PM LoRA Stacker (from Directory)
Load every LoRA in a folder into one stack, strengths included
- model
- clip
- LoRAStack
- LoRAWeights
Hand-loading LoRAs one at a time is fine when you have three. It's a chore when you have forty style LoRAs in a folder and you want to batch-merge them or compare them all. This node is the "point it at a directory and walk away" version: give it a folder path and it loads every LoRA in there into a stack, with a single strength applied to all of them. Combine it with the Stack Sampler and you've got a one-shot A/B test of your entire collection.
It's the node to reach for when your merge experiment needs the whole collection as inputs - like finding which combination of styles in a folder gives the merge you want. The unified strength is the catch: one strength_model and one strength_clip for everything. If you need per-LoRA strengths, that's PM LoRA Power Stacker's job instead.
How it works
It needs a model and clip connection because it uses them to resolve key mappings - how LoRA keys map onto the model and text encoder. It then scans directory, sorts the files (by name or date, either direction), applies layer_filter, and builds the stack. The optional limit (default -1 = all) caps how many it loads, which is handy when a folder has 200 files and you only want the first 20.
The inputs that matter
modelandclip- wire in your checkpoint's model and CLIP. Required.directory- the folder path containing your.safetensorsLoRAs.strength_model/strength_clip- global strengths for all LoRAs (default 1.0, range −10 to 10). The stack sampler will show you per-LoRA results even though the strength is uniform.layer_filter-full,attn-only,mlp-only,attn-mlp. If you only want attention layers merged, this is the dial.sort_byandlimit- ordering and count control.
Two outputs: LoRAStack (the patches, UNet + CLIP) and LoRAWeights (the strength metadata). Both feed straight into PM LoRA Stack Decompose.
Installing
Part of the LoRA Power-Merger pack. ComfyUI Manager (search "LoRA Power-Merger") or:
cd ComfyUI/custom_nodes
git clone https://github.com/larsupb/LoRA-Merger-ComfyUI
cd LoRA-Merger-ComfyUI
pip install -r requirements.txt
Restart ComfyUI. Dependencies: PyTorch, lxml, mergekit.
Common issues
The directory path must point at a folder ComfyUI's process can read - relative paths resolve against the ComfyUI working directory, so an absolute path is the reliable choice. Mixed-format folders will bite you: throw a LoHA or DoRA file in and it won't decompose cleanly later; keep the folder to standard LoRA format. And remember the strength is global, so if one LoRA in the folder is way louder than the rest, you'll notice it across the whole batch - check the stack sampler output before you commit to a merge.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | The diffusion model used to load LoRA UNet key mappings. | |
| clip | CLIP | The CLIP model used to load LoRA CLIP key mappings. | |
| directory | STRING | — | |
| strength_model | FLOAT | 1.00-10–10 | General model strength applied to all LoRAs. |
| strength_clip | FLOAT | 1.00-10–10 | General CLIP strength applied to all LoRAs. |
| layer_filter | COMBO | full | Filter for specific layers. |
| sort_by | COMBO | name | Sort LoRAs by name or size. |
| limit | INT | -1-1–1000 | Limit the number of LoRAs to load. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| LoRAStack | LoRAStack | — |
| LoRAWeights | LoRAWeights | — |