Nodes/ComfyUI-KSTR-Nodes/LoRA Ratio Stacker
ComfyUI Node

LoRA Ratio Stacker

Your LoRA Stack, Rescaled to a Total You Control

By Ye0l·Created 2 months ago·Updated about a month ago· 0
LoRA Ratio Stacker
  • lora_stack
  • lora_stack
  • applied_ratios
total_strength1.00
ratio_sourcemodel strength

If you stack several LoRAs, you've hit the arithmetic problem: individual strengths interact, and nudging one to 0.9 because it worked solo doesn't tell you what the blend does. This node treats your stack's strengths as ratios and rescales them to hit a target total - so the balance stays exactly as you set it while the overall intensity moves as one dial. It's a tiny node, but it's the kind of thing that makes a character-blend workflow actually iterable.

How it works

You feed it a LORA_STACK - the list format used by the LoraManager pack, where each entry is (lora_path, model_strength, clip_strength). It reinterprets those strengths as proportions and recomputes every entry so they sum to your total_strength.

The README example shows the math: with A=5, B=3, C=2 and total_strength = 1.2, you get A=0.60, B=0.36, C=0.24 - same 5:3:2 ratio, total 1.20. Move total_strength to 1.5 and the ratios stay put; everything scales together.

The one decision you actually make is ratio_source:

  • model strength (default) - ratios come from each LoRA's model strength; both model and clip get the same rescaled value.
  • clip strength - same thing, but driven by the clip strengths instead.
  • separate model / clip - model strengths are rescaled by their own sum and clip strengths by theirs, so the two are normalized independently.

This is genuinely useful because LoraManager lets you set wildly different model and clip strengths per LoRA - a styling LoRA at model 1.0 / clip 0.0, a character LoRA at 0.8 / 0.6 - and normalizing them together can crush one axis. separate model / clip keeps both axes sane.

Inputs and outputs

  • lora_stack (required) - the incoming stack, straight from a LoraManager stacker node.
  • total_strength (required, default 1.0) - the target total.
  • ratio_source (required, default "model strength").

Two outputs: lora_stack, the recalculated stack ready for Lora Loader (LoraManager), and applied_ratios, a STRING that spells out exactly what was applied per LoRA - handy to pin to a text view so you can read the breakdown after a run. If the ratio sum is zero (all strengths 0), it returns an empty stack with a message rather than dividing by zero.

Install

It ships in Ye0l/ComfyUI-KSTR-Nodes:

cd ComfyUI/custom_nodes
git clone https://github.com/Ye0l/ComfyUI-KSTR-Nodes

or search "ComfyUI-KSTR-Nodes" in ComfyUI Manager, then restart. It has no Python dependencies of its own - but it's useless without the ComfyUI-Lora-Manager pack installed, since that's where the LORA_STACK type and its stacker/loader nodes come from.

Where people get burned

The stack type is the trap: you can't feed it the stock LoraLoader's output. You need the LoraManager stacker on one side and its loader on the other - the README's chain is Lora Stacker (LoraManager) → LoRA Ratio Stacker → Lora Loader (LoraManager). One more thing to keep in mind: the ratios are summed by absolute value, so a deliberately negative strength (a "negative LoRA") stays negative in the rescaled output rather than flipping positive. That's the behavior you want, but it means your total isn't a naive addition of positives. It's a quiet, single-purpose utility - and for anyone juggling more than two LoRAs, it earns its slot fast.

CategoryYeol/LoRA

Inputs (3)

NameTypeDefaultDescription
lora_stackLORA_STACK
total_strengthFLOAT1.00-100–100
ratio_sourceCOMBOmodel strength3 options: model strength, clip strength, separate model / clip

Outputs (2)

NameTypeDescription
lora_stackLORA_STACK
applied_ratiosSTRING