Nodes/ComfyUI-Conditioning-Rebalance/Load LoRA Folder (Block)
ComfyUI Node

Load LoRA Folder (Block)

Load a whole LoRA folder at once — with every block starting at zero

By nova452·Created 5 months ago·Updated 4 days ago· 555
Load LoRA Folder (Block)
  • model
  • model
  • report
◄folder▾►
◄methodstack (add)►
◄recursivetrue►
◄strength1.00►
◄first0.00►
◄tmlp0.00►
◄txtmlp0.00►
◄tproj0.00►
◄txtfusion_layerwise_blocks_00.00►
◄txtfusion_layerwise_blocks_10.00►
◄txtfusion_projector0.00►
◄txtfusion_refiner_blocks_00.00►
◄txtfusion_refiner_blocks_10.00►
◄blocks_00.00►
◄blocks_10.00►
◄blocks_20.00►
◄blocks_30.00►
◄blocks_40.00►
◄blocks_50.00►
◄blocks_60.00►
◄blocks_70.00►
◄blocks_80.00►
◄blocks_90.00►
◄blocks_100.00►
◄blocks_110.00►
◄blocks_120.00►
◄blocks_130.00►
◄blocks_140.00►
◄blocks_150.00►
◄blocks_160.00►
◄blocks_170.00►
◄blocks_180.00►
◄blocks_190.00►
◄blocks_200.00►
◄blocks_210.00►
◄blocks_220.00►
◄blocks_230.00►
◄blocks_240.00►
◄blocks_250.00►
◄blocks_260.00►
◄blocks_270.00►
◄last0.00►
◄other0.00►

If you've ever stacked twelve Krea 2 style LoRAs at 0.6 each and watched the late blocks cook the image into a contrast-crushed mess, this node is aimed at you. What it does is simple to state and strange to use the first time: point it at a folder inside your loras directory, and it applies every LoRA in that folder, scaled by one 0–1 slider per model block group.

That's the whole idea. It's the ComfyUI translation of the old A1111 sd-webui-lora-block-weight extension, where you could weight each block of a LoRA separately instead of the file as a single lump. Same instinct, keyed to Krea 2's module layout and stretched over a whole folder.

Why you'd want it

A LoRA isn't uniform. The early blocks carry layout and composition, the middle carries structure and texture, the tail carries the finish. When one LoRA fights the image, the fix is usually not "turn it down" but "turn down the part that's fighting." Doing that by hand across a folder of twenty files is unthinkable; doing it once, as a vector, is a two-minute job.

There's a sneakier use: bulk testing. Point it at a folder of style LoRAs, set average, and you get the mean of the set - a cheap way to find out whether a collection has a coherent house style or is just noise.

How it works

The node lists every LoRA-shaped file in the chosen folder (.safetensors, .sft, .pt, .pth, .ckpt, .bin), loads each one with ComfyUI's own LoRA machinery, and patches the model with a per-module scale of strength × block weight. Modules are bucketed by block group, so instead of 4,000 individual patches you get one add_patches call per distinct ratio.

For the ranked merge modes it computes each file's delta magnitude as ||up|| × ||down|| × alpha/rank, straight from the raw LoRA factors, without materialising full merged deltas. That's what makes max magnitude (module) and strongest file only cheap enough to run.

The inputs that matter

Four things, then the wall of sliders.

folder is a dropdown built from your loras directory - pick (loras root) for everything, or a subfolder. Only folders that actually contain LoRAs appear, and file traversal is guarded so you can't point it outside the loras root.

method decides how the folder's files combine before the block vector applies. stack (add) is every LoRA at full scale. average divides by the applied file count, so you get a true mean at 1.0. max magnitude (module) and min magnitude (module) pick one winner per module by delta size; strongest file only applies just the file with the biggest total delta. Start with stack and average.

recursive (on by default) pulls in subfolders, which is how you accidentally load 300 files instead of 8. strength is a global multiplier from -10 to 10 on top of everything.

Then roughly 40 block sliders - first, tmlp, txtmlp, tproj, the txtfusion_* groups, blocks_0 through blocks_27, last, other. All of them default to 0.0, and 0.0 silences that block completely.

That default is the point and also the trap. Insert the node, hit queue, get a pixel-identical image and assume the node is broken - it isn't, every block is off. Turn up blocks_8 through blocks_20 at 0.5 and try again.

You get two outputs: model, which goes wherever your model wire went (into a sampler, or into another loader), and report, a plain string. The report is genuinely worth wiring to a text preview - it tells you the method, which blocks are up, and whether files were missing.

Install

No dependencies, no model downloads, no pip. The pack is pure Python on top of ComfyUI's own LoRA code:

cd ComfyUI/custom_nodes
git clone https://github.com/nova452/ComfyUI-ConditioningKrea2Rebalance
# restart ComfyUI

ComfyUI Manager users can search the pack title, ComfyUI-Conditioning-Rebalance (the repo was previously called Rebalance-Pack, which is what the README still says - same code). There's no requirements.txt in the repo, so if a tutorial tells you to install something first, it's wrong. Nodes land in the loaders category.

Where people get burned

The zero defaults, first and always.

Second: this variant is Krea 2 only. The block names are Krea 2's module names, and patches are mapped against the model you hand it. Feed it a Flux or SDXL model and you get nothing useful in the report and no change in the image.

Third: strength at 0 returns your model untouched, silently. If you were experimenting with strength as a dial and set it to 0 to "check", you were checking nothing.

And a wider warning: brute-forcing a folder of styles through a model is the blunter instrument in every workflow. Check the report, change one block group at a time, keep the seed fixed.

Categoryloaders

Inputs (44)

NameTypeDefaultDescription
modelMODEL—
folderCOMBO1 options: (loras root)
methodCOMBOstack (add)How the folder's LoRAs combine before the block vector applies.
recursiveBOOLEANtrueAlso load LoRAs in subfolders of the selected folder.
strengthFLOAT1.00-10–10Global multiplier on top of every block weight.
firstFLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
tmlpFLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
txtmlpFLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
tprojFLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
txtfusion_layerwise_blocks_0FLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
txtfusion_layerwise_blocks_1FLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
txtfusion_projectorFLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
txtfusion_refiner_blocks_0FLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
txtfusion_refiner_blocks_1FLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
blocks_0FLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
blocks_1FLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
blocks_2FLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
blocks_3FLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
blocks_4FLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
blocks_5FLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
blocks_6FLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
blocks_7FLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
blocks_8FLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
blocks_9FLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
blocks_10FLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
blocks_11FLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
blocks_12FLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
blocks_13FLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
blocks_14FLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
blocks_15FLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
blocks_16FLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
blocks_17FLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
blocks_18FLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
blocks_19FLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
blocks_20FLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
blocks_21FLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
blocks_22FLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
blocks_23FLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
blocks_24FLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
blocks_25FLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
blocks_26FLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
blocks_27FLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
lastFLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.
otherFLOAT0.000–1Block multiply across every LoRA in the folder; 0.0 silences the block.

Outputs (2)

NameTypeDescription
modelMODEL—
reportSTRING—