ComfyUI Node

sum_lora

Sum_lora

By cardenluo·Created 2 years ago·Updated a day ago· 324
sum_lora
  • context
  • model
  • clip
  • context
  • positive
  • negative
lora_01
strength_011.00
lora_02
strength_021.00
lora_03
strength_031.00
pos
neg
styleNone

If you've ever tried to stack three LoRAs in stock ComfyUI, you know the ritual: three LoraLoader nodes, each taking model + clip from the previous one, each with a strength slider, all hanging off a chain that's one wrong wire away from doing nothing. sum_lora collapses that whole tower into a single node. It takes the context's model and clip, applies up to three LoRAs with per-LoRA strength, optionally re-encodes fresh prompt text, optionally appends a style from the pack's 323-entry library, and hands you back an updated context plus new conditioning.

It's the pack's answer to the rgthree Power Lora Loader - same "stop making me wire five nodes to do one thing" energy, but built around the context model instead of raw wires.

What it actually does

Pull model and clip from the context if nothing's wired in directly, then for each of the three slots: if the LoRA isn't None and the strength isn't 0, it loads it through ComfyUI's LoraLoader, chaining each one onto the result of the last. Then, if you typed pos/neg text, it CLIP-encodes through the (possibly LoRA-patched) clip to produce fresh positive/negative conditioning. Then it writes everything back into a new context.

The inputs that matter

  • lora_01 / lora_02 / lora_03 - the file pickers, populated from models/loras.
  • strength_01 / strength_02 / strength_03 - the per-LoRA weights, -10 to +10. Set to 0 and that slot is skipped entirely, which is how you keep one node with three slots without always loading three LoRAs.
  • pos / neg - prompt text. Leave blank to keep whatever conditioning the context already carried; non-blank re-encodes. Note the quirk: the code encodes negative only when both pos and neg are non-blank, so an empty pos means your neg is silently ignored too.
  • style - the 323-preset style library. Picks an entry and appends its positive (and negative, where defined) text to your prompts. The names are Chinese-first - 通用-基础, 通用-写实, SAI官方-3d模型 and so on - but they're self-describing enough that you can treat them as "general-realistic," "general-clean," etc.

The outputs that matter

context (updated), positive, and negative - the new conditioning, which is what the sampler will actually use.

Wiring it in

The usual chain: sum_load_simplesum_lora → stack/editor → sum_Ksampler. It slots anywhere between loader and sampler since it reads and writes context.

Installing it

cd ComfyUI/custom_nodes
git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git
cd ComfyUI-Apt_Preset
pip install -r requirements.txt   # Windows: double-click install.bat

Or ComfyUI Manager → ComfyUI-Apt_Preset.

Common issues

The pos/neg coupling is the trap: because both prompts are processed as one unit, a workflow that feeds in a negative through neg and expects it to stick while pos is left empty will get a surprise - the negative goes nowhere. If you want conditioning from the context preserved, leave both blank and let the LoRAs do their thing; the model gets patched either way. And as with sum_load_simple, LoRA loading on quantized models costs speed - the GGUF dequantize-patch-requantize cycle is real, so if you're running Q8 with three LoRAs and wondering why it's slow, that's the tax, and dropping a quant level to make room often nets out faster.

CategoryApt_Preset/chx_tool

Inputs (12)

NameTypeDefaultDescription
contextRUN_CONTEXT
lora_01COMBO1 options: None
strength_01FLOAT1.00-10–10
lora_02COMBO1 options: None
strength_02FLOAT1.00-10–10
lora_03COMBO1 options: None
strength_03FLOAT1.00-10–10
modeloptMODEL
clipoptCLIP
posoptSTRING
negoptSTRING
styleoptCOMBONone323 options: None, 通用-基础, 通用-写实, 通用-效果图, 通用-纯净, SAI官方-3d模型, +317

Outputs (3)

NameTypeDescription
contextRUN_CONTEXT
positiveCONDITIONING
negativeCONDITIONING