PM LoRA Parameter Sweep Sampler
Sweep merge parameters visually instead of guessing — the merge dial-testing node
- vae
- noise
- guider
- sampler
- sigmas
- latent_image
- merge_context
- latents
- image_grid
Every merge method has knobs - SLERP's t, TIES and DARE's density, the normalize toggles - and the standard way to tune them is to change a value, sample, look, repeat, for an hour. This node collapses that loop: it takes the merge context from PM LoRA Merger, re-runs the merge across a range of one or two parameter values, and samples an annotated grid so you can see the whole sweep at once.
It's the tool that turns merge tuning from a chore into a ten-second glance. The author originally shipped XY-plot components with the pack (that was the headline feature in the 2024 launch post), and this is the modern, more general version of the same idea.
How it works
Instead of feeding it a merged LoRA, you feed it the merge_context output from the merger - the reusable merge configuration. For each parameter value it re-runs the merge, samples, and labels the image with the parameter name and value. The parameter value format is flexible:
- Linspace:
"0.25 - 0.75 | 3"→ three evenly spaced points - Step:
"0.25 - 0.75 : 0.25"→ increments - Explicit:
"0.25, 0.5, 0.75"→ exact list - Boolean: a boolean parameter auto-expands to
[False, True]and ignores the values field
With parameter_name_2 and parameter_values_2 filled in you get a 2D sweep - density by rank, say - arranged as a rows-by-columns grid. There's a hard cap of 64 images to keep you from launching a compute disaster.
The inputs that matter
merge_context- from PM LoRA Merger. This is what makes the whole thing work; wire it in instead of the LoRA output.parameter_nameandparameter_values- what to sweep and over which values.parameter_name_2andparameter_values_2- optional second dimension (leave blank for 1D).- Plus the standard
noise,guider,sampler,sigmas,latent_image, andvaerig.
Outputs: latents and the annotated image_grid.
Installing
Ships in 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 parameter name must match the merge method's actual setting - try to sweep "density" on SLERP and you'll get an error listing the valid parameters, which is at least a helpful failure. A 2D sweep multiplies fast: 3×3 is fine, but keep the 64-image cap in mind when designing your grid. And remember the sampler is doing a full merge plus sample per point, so a big sweep is a long queue - the progress bar (fixed to span all iterations in 2.3.0) is your friend.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| vae | VAE | — | |
| noise | NOISE | — | |
| guider | GUIDER | — | |
| sampler | SAMPLER | — | |
| sigmas | SIGMAS | — | |
| latent_image | LATENT | — | |
| merge_context | MergeContext | Merge configuration from LoRA Merger (Mergekit) node | |
| parameter_name | STRING | t | Name of the parameter to sweep (e.g., 't' for SLERP, 'density' for TIES) |
| parameter_values | STRING | 0.25 - 0.75 | 3 | Parameter values to test. Formats: '0.25 - 0.75 | 3' (linspace), '0.25 - 0.75 : 0.25' (step), '0.25, 0.5, 0.75' (explicit). Ignored for boolean parameters (auto uses [False, True]). |
| parameter_name_2 | STRING | Optional second parameter name for 2D sweep (leave empty for single parameter) | |
| parameter_values_2 | STRING | Second parameter values (same formats as parameter_values). Ignored for boolean parameters. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| latents | LATENT | — |
| image_grid | IMAGE | — |