ComfyUI Node

MLiang LoRA Loader

Your LoRA collection as a file tree you can actually click through

By dingmuliang·Created 3 months ago·Updated 3 months ago· 9
MLiang LoRA Loader
  • model
  • clip
  • model
  • clip
loras_ui[]

You know the pain. Stock ComfyUI's LoraLoader hands you a dropdown with five hundred entries in one flat alphabetical list, and you spend half your session scrolling past zzzz_cats_v2 to find the one you actually wanted. MLiang LoRA Loader is the "I'm done with that" node: it turns your whole loras folder into a real, clickable file tree - folders and subfolders and all - with hover previews, search, and unlimited stacked slots.

It's a young, one-node pack from dingmuliang, and to be blunt about its standing: it has zero footprint on reddit and the README does most of its own promoting. Nobody's fighting over it yet. But if you keep LoRAs organized into folders the way you keep checkpoints, this is genuinely the nicest way I've found to load several at once without assembling them from a dropdown.

How it actually works

The clever bit is that the tree isn't generated in your browser - it's built server-side. At import, the node walks every directory ComfyUI knows about under loras (via folder_paths.get_folder_paths), reads the folder structure, and serializes it into js/tree_data.js inside the pack, which the frontend widget reads on load. It also registers a tiny API route, /mliang-lora/preview, that serves preview images keyed by a hash of their local path - so the browser never sees your absolute file paths, just hashed lookups. Preview images are picked up automatically: drop a mymodel.png or .jpg next to mymodel.safetensors and hovering shows it.

The node itself is a thin frontend shell (built with the same addDOMWidget approach ComfyUI-Lora-Manager uses) over a backend that mirrors stock ComfyUI's own LoRA math. When it runs, load_loras() parses the slots into a list, skips anything disabled or empty, and applies each one in order with comfy.utils.load_torch_file + comfy.sd.load_lora_for_models. Sequential stacking, exactly like chaining stock loaders - no surprises.

The inputs and outputs that matter

Honestly, only two inputs matter, and you wire them the same way you wire a stock LoraLoader:

  • model - the checkpoint's MODEL output
  • clip - the checkpoint's CLIP output

There's a third, loras_ui, a STRING defaulting to "[]". That's just the serialized JSON state of the multi-slot widget - the browser panel writes it for you, so don't edit it by hand unless you're sharing workflows. Outputs are model and clip, which feed straight into your sampler, KSampler, or whatever's next. One thing the README gets wrong: it lists "single strength value for model+clip" as a limitation, but the code already ships separate strength_model and strength_clip per slot. README lagged the code, as usual.

Installing it

ComfyUI Manager is the easy route - search "MLiang LoRA Loader" and install. Or the manual way:

cd ComfyUI/custom_nodes/
git clone https://github.com/dingmuliang/comfyui-mliang-lora-loader.git

Then restart ComfyUI - a page refresh isn't enough, because the tree is built at startup. The good news on dependencies: there are none. requirements.txt is empty; everything uses ComfyUI's built-in comfy.sd and comfy.utils. No torch conflicts, no extra downloads.

Where people get burned

The restart thing is the big one, and it's the price of the import-time tree scan: drop a new LoRA into a folder mid-session and it won't appear until you restart the whole server. That gets old fast if you're downloading LoRAs all day - it's the main reason this isn't a drop-in replacement for rgthree's Power LoRA Loader, which reads the folder live. Also worth knowing: the node writes tree_data.js into its own directory on every startup, and if your previews are missing, it's almost always because the PNG doesn't share a name with the safetensors file. Keep them identical and it just works.

If you're already deep in rgthree, its Power LoRA Loader covers the multi-stack-with-toggles case fine. MLiang is for the browser. For a folder-hoarding LoRA collector, that's a real difference - and for everyone else, it's a free, dependency-free upgrade over squinting at a dropdown.

Categoryloaders

Inputs (3)

NameTypeDefaultDescription
modelMODEL
clipCLIP
loras_uioptSTRING[]

Outputs (2)

NameTypeDescription
modelMODEL
clipCLIP