Nodes/comfyui-oli-prompt-tools/Mega Lora Loader (Oli)
ComfyUI Node

Mega Lora Loader (Oli)

Stack LoRAs without the silent mismatch crashes

By magicoli·Created 6 months ago·Updated 5 months ago· 0
Mega Lora Loader (Oli)
  • lora_stack
  • model
  • clip
  • lora_stack
  • MODEL
  • CLIP
enabletrue

Mega Lora Loader (Oli) is a stackable multi-LoRA loader, and the "Mega" is doing real work: pile on as many LoRA rows as you want, and it refuses to apply the ones that don't fit your model. No red error boxes, no garbage output, no "why is my Flux image full of SDXL artifacts" moment - the incompatible LoRA just doesn't get applied.

It's inspired by rgthree's Power Lora Loader, the loader most people already have installed. The difference is the compatibility check, and that check is the whole point of this node.

How the compatibility check works

LoRAs are architecture-bound - an SDXL LoRA does nothing useful on Flux, and even Pony, Illustrious, and vanilla SDXL LoRAs cross over unreliably despite sharing code. Normally you find that out the hard way, mid-output. This node checks before loading:

  1. It reads each LoRA's safetensors header only - no weights are loaded, so the check is fast and cheap.
  2. It strips the LoRA-specific suffixes (.lora_up.weight, .lora_down.weight, .alpha, and friends) to get base key names.
  3. It builds the connected model's expected LoRA key map using ComfyUI's own model_lora_keys_unet() and compares.

No key matches → the LoRA is silently skipped: orange in the UI, one line in your console, no crash. Older .ckpt/.pt LoRAs fall back to a full torch load, so they still work, just slower to check.

Two details worth knowing:

  • The filter only runs when a model is connected. No model → every LoRA counts as compatible and goes on the stack.
  • "Silently skipped" is a feature and a trap. If a LoRA you expected just doesn't show up in your output, check the console - it was almost certainly filtered, not forgotten.

Two ways to use it

Connect model and clip and each row applies immediately, like any loader. Leave them unconnected and the node becomes a stack-only definition block: it builds a LORA_STACK without touching anything. Chain several of these, feed the final stack into a loader that does have model/clip connected, and you've defined your LoRA set once and can apply it to multiple models at different points in the graph. That's the rgthree pattern, made stackable.

Rows are added with the ➕ Add LoRA button - each gets an on/off toggle, a LoRA dropdown, and a strength slider. enable is a master switch: wire it to a router or a boolean node and you can bypass the entire loader in one stroke, which pairs naturally with switch/router workflows.

Inputs and outputs

Beyond the dynamic rows, the optional inputs are lora_stack (incoming stack from another loader, prepended), model, clip, and enable (default true). Outputs are lora_stack (the full stack - upstream entries plus yours), MODEL, and CLIP with the compatible LoRAs applied.

Install & gotchas

cd ComfyUI/custom_nodes
git clone https://github.com/magicoli/comfyui-oli-prompt-tools

…or ComfyUI Manager → Oli Prompt Tools. Restart. No dependencies beyond stock ComfyUI.

The honest caveat: the header check catches hard mismatches (wrong architecture), but it can't judge quality. A LoRA that's technically compatible but badly trained still gets applied and still looks bad. And strength semantics follow standard ComfyUI loading - if clip isn't connected, CLIP strength drops to zero rather than defaulting to model strength, so leave it attached if you stack CLIP-affected LoRAs.

CategoryOli/loaders

Inputs (4)

NameTypeDefaultDescription
enableoptBOOLEANtrue
lora_stackoptLORA_STACK
modeloptMODEL
clipoptCLIP

Outputs (3)

NameTypeDescription
lora_stackLORA_STACK
MODELMODEL
CLIPCLIP