Nodes/LoRA Range Loader/Load LoRA Range (Model Only)
ComfyUI Node

Load LoRA Range (Model Only)

Sweep every epoch checkpoint on autopilot

By esp-dev·Created 4 months ago·Updated 4 months ago· 0
Load LoRA Range (Model Only)
  • model
  • MODEL
first
last
current
modefixed
strength_model1.00

You trained a LoRA and your trainer spat out mychar-000012, 000018, 000024 … ten checkpoints, and the internet has told you the last one is usually not the best. So now what - open the loader, pick one, run, swap, run, swap, for an hour? Load LoRA Range (Model Only) exists to retire that ritual. It's the core Load LoRA (Model Only) node with a filename range sweep bolted on, so it walks itself through every checkpoint in your folder, one queue per file, and you actually get to look at results instead of babysitting the dropdown.

It's a small, sharp tool from a small pack (comfyui-lora-range-loader by esp-dev, one node, one job). If you never train your own LoRAs, skip it - the plain core loader does everything else. If you do, this is the node that makes "save intermediate epochs" advice practical.

How it works

Two halves split the work. The Python side is just the core loader: the class literally subclasses ComfyUI's own LoraLoader and calls the same load_lora() underneath, with a None CLIP so you get a model-only load. It loads only current - first, last, and mode are discarded on the backend; they're pure instructions for the frontend.

The frontend JavaScript does the actual sweeping. When the workflow is queued, it sorts your LoRA filenames (numeric-aware, so 10 sorts after 9, not after 1), slices the allowed range between first and last, and advances current through it according to mode. Because the swap happens at queue time, the run you just queued uses the value visible on the node, and the next value is staged for the following run. Queue repeatedly, collect results, pick a winner.

The inputs that matter

Five required inputs, and you set all of them once:

  • first and last - LoRA dropdowns that bracket the range to sweep. Anything outside them is off-limits to the modes.
  • current - the LoRA actually loaded this run. It has to live between first and last for auto-switching to touch it.
  • mode - fixed (never move), increment / decrement (walk forward/back through the sorted range, wrapping at the ends), or random (pick any file in range).
  • strength_model - the one you'll actually tune. Default 1.0, range −100 to 100 in 0.01 steps, and yes it can go negative. The 0.5–0.8 range the community lands on for overcooked LoRAs applies here just as it does anywhere else.

One output: MODEL, the modified diffusion model, straight into your sampler/KSampler chain. No CLIP output - that's what "Model Only" means, so pair it with a normal CLIP path.

Install

Two routes, both painless, zero Python dependencies (the pack's requirements.txt literally says none are needed):

cd ComfyUI/custom_nodes
git clone https://github.com/esp-dev/comfyui-lora-range-loader

then restart ComfyUI. Or open ComfyUI Manager, search "LoRA Range Loader", install, restart. Done.

Where people get burned

The traps are all in the README's range rules, so here they are up front:

  • mode defaults to fixed. Set everything up, hit queue, and nothing advances - that's not a bug, you just never switched modes. This is the #1 "it doesn't work" report waiting to happen.
  • first must sort before last. If it doesn't, the node quietly disables auto-switching (it'll still load current fine, so you may not notice for a while).
  • current outside the range still loads, but increment, decrement, and random won't touch it.
  • The sweep is frontend-dependent. Auto-advance needs the widget queue hooks in a modern ComfyUI frontend. If the extension doesn't run, the node degrades to a perfectly usable manual model-only loader - you just lose the autopilot.

Set your range, pick increment, queue the workflow a dozen times, and go make tea while it compares your epochs for you.

Categoryloaders

Inputs (6)

NameTypeDefaultDescription
modelMODELThe diffusion model the LoRA will be applied to.
firstCOMBOFirst LoRA in the allowed filename range.
lastCOMBOLast LoRA in the allowed filename range.
currentCOMBOThe LoRA that will be loaded for the current run.
modeCOMBOfixedHow current should change after a run is queued.
strength_modelFLOAT1.00-100–100How strongly to modify the diffusion model. This value can be negative.

Outputs (1)

NameTypeDescription
MODELMODELThe modified diffusion model.