Nodes/ComfyUI-Brekel/Brekel Lora Loader (Directory)
ComfyUI Node

Brekel Lora Loader (Directory)

Queue up a folder of LoRAs and let ComfyUI work through them

By Brekel·Created about a year ago·Updated a day ago· 19
Brekel Lora Loader (Directory)
  • model
  • clip
  • MODEL
  • CLIP
  • LORA_NAME
folder_path
lora_index0
strength_model1.00
strength_clip1.00

The standard LoraLoader hands you a dropdown of every LoRA in your loras folder. That's fine when you're grabbing one. It's a pain for the other thing people actually do: run a whole folder of LoRAs and compare the results, or queue a batch where each run uses a different one. That's exactly the niche Brekel Lora Loader (Directory) fills - it picks a LoRA by index instead of by name, and because the index is a plain number widget it gets the same fixed / increment / decrement / randomize control your seed has. Set it to increment and every queued run walks to the next file in the folder. Set it to randomize and each run rolls a fresh pick. That's the whole trick, and it's genuinely useful for style tests and batch renders.

How it works

You wire in your model and clip from a checkpoint loader, type a folder_path, and give it a lora_index. Behind the scenes it lists the folder, keeps only .safetensors/.ckpt/.pt files, sorts them alphabetically, and applies lora_index % file_count so an index larger than the folder just wraps around instead of erroring. It even caches the last file it loaded, so stepping through a folder on repeated runs doesn't re-read the weights off disk every time.

The inputs that matter:

  • folder_path - leave it empty and it falls back to ComfyUI's default loras folder; otherwise point it anywhere on disk, including folders ComfyUI's own dropdown can't see.
  • lora_index - the star of the show. The dropdown underneath it (increment, randomize, …) is what turns a manual loader into a batch tool.
  • strength_model / strength_clip - the usual LoRA weights. Both at 0 is a special case: it skips loading entirely and passes model/clip straight through, which is a tidy way to disable a LoRA in an A/B test without rewiring anything.

It outputs MODEL and CLIP with the LoRA applied - plug those into your sampler like any loader - plus a third output most loaders don't have: LORA_NAME, the filename without its extension. Wire that into a save node's filename_prefix or a text field and every image in your batch records which LoRA made it. That's the piece that turns "I ran 12 generations" into "I can tell which one was which."

Gotchas

The quiet failure mode is that this node fails silently on purpose. Bad path, or a folder with no matching files? It prints "Directory not found" / "No LoRA models found" to the console and passes model/clip through with LORA_NAME set to "None" - your queue keeps running, and you may not notice you've rendered a dozen images with no LoRA at all. If LORA_NAME comes back None, that's the tell.

Two more things to keep in mind. First, the index counts alphabetically by filename, so adding or removing a file shifts every index after it - for a stable batch, keep the folder frozen. Second, this is a one-LoRA-at-a-time node. If you want to stack five LoRAs with per-slot toggles, the rgthree Power Lora Loader is the tool for that job; Brekel's loader is for automation over a single folder. And the usual rules still apply: a Flux LoRA won't load on SDXL and vice versa, so make sure the folder matches your checkpoint.

Also - the increment control fires after the run, same as seed widgets, so the index you see is the one used next. If that trips you up, the "widget control mode → Before" setting fixes the whole class of problem at once.

Install

ComfyUI Manager is the easy path: open it, search "Brekel", install the ComfyUI-Brekel pack, restart. Or manually:

cd ComfyUI/custom_nodes/
git clone https://github.com/Brekel/ComfyUI-Brekel.git

Then restart ComfyUI. No model files and no extra pip packages needed for this node - the pack's requirements.txt (bitsandbytes, accelerate) only exists for its LLM prompt-enhancer node. It's from Brekel, the same name behind the old Kinect motion-capture tools and the well-regarded VisionCaptioner, and the code is tidy enough to match.

Categoryloaders

Inputs (6)

NameTypeDefaultDescription
modelMODEL
clipCLIP
folder_pathSTRING
lora_indexINT00–999999
strength_modelFLOAT1.00-10–10
strength_clipFLOAT1.00-10–10

Outputs (3)

NameTypeDescription
MODELMODEL
CLIPCLIP
LORA_NAMESTRING