PM LoRA Block Sampler
See which blocks of a LoRA actually matter — round-robin block sampling
- noise
- guider
- sampler
- sigmas
- latent_image
- lora
- vae
- model
- latents
- image_grid
This node answers a question most people never ask but really should: which blocks of your LoRA are doing the work? It samples the same image repeatedly, each time applying the LoRA's patches to a different subset of blocks, and shows you the effect in a grid. Some LoRAs are all about the attention blocks; others carry their identity in the middle block. Knowing which is which tells you what a merge or a block-weight tweak will actually change.
It's the investigative sibling of the Stack Sampler. That one compares LoRAs against each other; this one dissects a single LoRA layer by layer. If you've ever used PM LoRA Modifier to scale specific blocks and wondered whether the scaling did anything, this is how you check.
How it works
You feed it a LoRABundle plus the full sampling rig. It walks through the LoRA's blocks in round-robin fashion, and for each pass applies the patches to a different block slice. The mode decides the framing:
round_robin_exclude- each sample has one group of blocks excluded, showing what that block contributes by its absence.round_robin_include- each sample has one group of blocks included, showing what that block alone does.
The image_display setting picks between showing the actual generated image or image_diff - the pixel difference against a base image, which makes subtle block contributions visible that the plain render hides. Previews run live during sampling (fixed in 2.3.0), so you're not staring at a blank progress bar.
The inputs that matter
noise,guider,sampler,sigmas,latent_image- the standard sampling rig.modelandvae- the model to patch and the VAE for decoding.lora- theLoRABundleto dissect.bock_sampling_mode- yes, that typo is in the code; it's the include/exclude mode above.image_display-imageorimage_diff.
Outputs: latents and an image_grid for comparison.
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
Two things to know going in. First, it's a multi-sample node - a LoRA with a dozen block groups means a dozen samples, so budget the runtime like you would a batch. Second, if your decoded images look washed out or like weird diffs, you're on an old version: 2.3.0 fixed exactly that (the denoised latent is now passed through the model's latent processing before VAE decode, and latents are combined correctly). Update the pack if you see it. And image_diff is the mode that needs a base reference - if the diff looks meaningless, confirm you understand which sample is the baseline.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| noise | NOISE | — | |
| guider | GUIDER | — | |
| sampler | SAMPLER | — | |
| sigmas | SIGMAS | — | |
| latent_image | LATENT | — | |
| lora | LoRABundle | — | |
| vae | VAE | — | |
| model | MODEL | — | |
| bock_sampling_mode | COMBO | 2 options: round_robin_exclude, round_robin_include | |
| image_display | COMBO | 2 options: image, image_diff |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| latents | LATENT | — |
| image_grid | IMAGE | — |