Nodes/m10i/Load LoRA from Multiple Files
ComfyUI Node

Load LoRA from Multiple Files

Stack several LoRAs from one JSON recipe

By 0nyx-networks·Created 7 months ago·Updated 4 months ago· 0
Load LoRA from Multiple Files
  • model
  • clip
  • model
  • clip
lora_params_json[]
raise_error_on_failurefalse

The normal way to apply three LoRAs in ComfyUI is a chain of three LoraLoader nodes, each with its own dropdown, each wired model-to-model. It works. It's also a wall of nodes that's painful to drive dynamically. Load LoRA from Multiple Files collapses the whole chain into one node whose recipe is a JSON list - which means you can build, mutate, and even generate that recipe with other nodes.

How it works

The single required input lora_params_json is a JSON array of objects, each describing one LoRA:

[
  {"file_name": "style_v2.safetensors", "strength_model": 0.8, "strength_clip": 0.8},
  {"file_name": "face_v3.safetensors", "strength_model": 0.6, "strength_clip": 1.0}
]

Every entry must contain all three keys (file_name, strength_model, strength_clip) or it's skipped with a warning. The node resolves each filename against your loras folder, loads the weights safely, and applies them with comfy.sd.load_lora_for_models - but crucially it chains: each LoRA is applied to the output of the previous one, exactly like a hand-wired stack. That means order matters, the same way it does in the manual chain - face_v3 sees the model already modified by style_v2. Rearranging the JSON rearranges the stack.

The result comes out of model and clip as one patched pair. It's the same math as core ComfyUI's loader, just N of them in a loop.

Inputs and outputs

  • model, clip - the incoming pair.
  • lora_params_json - the recipe, multiline, default [].
  • raise_error_on_failure (optional) - default false.

Outputs: model, clip.

Driving it dynamically

This is where the node earns its keep. The recipe is just a string, so any node that produces JSON can feed it:

  • LoadSafetensorsFromMultipleUrls (same pack) downloads a batch of safetensors from URLs and returns a results_json that already contains file_name, strength_model, and strength_clip per entry - wire that straight in and you've got "download three LoRAs from URLs and apply them" as one pipeline.
  • JsonValueMutator (same pack) can add or override entries.
  • Any LLM node that can emit a JSON array can compose the stack.

Same footgun as its single-file sibling: with raise_error_on_failure off, bad entries are skipped silently and you get model/clip with whatever did apply - a malformed recipe can quietly drop half your LoRAs. Validate the JSON in a display node first if a run looks un-LoRA'd. And if a filename doesn't exist in loras, that entry is skipped too, so the "silent" part of silent failure cuts both ways.

Install

ComfyUI Manager → search "comfy-nekonote-extensions", or:

cd ComfyUI/custom_nodes
git clone https://github.com/0nyx-networks/comfy-nekonote-extensions

Restart ComfyUI; it's under NEKONOTE → Load. The MIT-licensed pack (MINETA "m10i" Hiroki, v0.4.7) ships no model files - the LoRAs are yours, wherever you normally keep them. No special dependencies beyond the standard ComfyUI stack; the one requirement is a current ComfyUI, since the pack uses the newer comfy_api.latest backend API.

CategoryNEKONOTE/Load

Inputs (4)

NameTypeDefaultDescription
modelMODEL
clipCLIP
lora_params_jsonSTRING[]
raise_error_on_failureoptBOOLEANfalse

Outputs (2)

NameTypeDescription
modelMODEL
clipCLIP