Nodes/Bjornulf_custom_nodes/โ™ป๐Ÿ‘‘ Loop Lora Selector
ComfyUI Node

โ™ป๐Ÿ‘‘ Loop Lora Selector

Run every LoRA in turn to compare them

By justUmenยทCreated 2 years agoยทUpdated about a year agoยท 545
โ™ป๐Ÿ‘‘ Loop Lora Selector
  • model
  • clip
  • model
  • clip
  • lora_path
  • lora_name
  • lora_folder
โ—„number_of_loras3โ–บ
โ—„lora_1noneโ–บ
โ—„strength_model_11.00โ–บ
โ—„strength_clip_11.00โ–บ
โ—„lora_2noneโ–บ
โ—„strength_model_21.00โ–บ
โ—„strength_clip_21.00โ–บ
โ—„lora_3noneโ–บ
โ—„strength_model_31.00โ–บ
โ—„strength_clip_31.00โ–บ
โ—„lora_4noneโ–บ
โ—„strength_model_41.00โ–บ
โ—„strength_clip_41.00โ–บ
โ—„lora_5noneโ–บ
โ—„strength_model_51.00โ–บ
โ—„strength_clip_51.00โ–บ
โ—„lora_6noneโ–บ
โ—„strength_model_61.00โ–บ
โ—„strength_clip_61.00โ–บ
โ—„lora_7noneโ–บ
โ—„strength_model_71.00โ–บ
โ—„strength_clip_71.00โ–บ
โ—„lora_8noneโ–บ
โ—„strength_model_81.00โ–บ
โ—„strength_clip_81.00โ–บ
โ—„lora_9noneโ–บ
โ—„strength_model_91.00โ–บ
โ—„strength_clip_91.00โ–บ
โ—„lora_10noneโ–บ
โ—„strength_model_101.00โ–บ
โ—„strength_clip_101.00โ–บ
โ—„lora_11noneโ–บ
โ—„strength_model_111.00โ–บ
โ—„strength_clip_111.00โ–บ
โ—„lora_12noneโ–บ
โ—„strength_model_121.00โ–บ
โ—„strength_clip_121.00โ–บ
โ—„lora_13noneโ–บ
โ—„strength_model_131.00โ–บ
โ—„strength_clip_131.00โ–บ
โ—„lora_14noneโ–บ
โ—„strength_model_141.00โ–บ
โ—„strength_clip_141.00โ–บ
โ—„lora_15noneโ–บ
โ—„strength_model_151.00โ–บ
โ—„strength_clip_151.00โ–บ
โ—„lora_16noneโ–บ
โ—„strength_model_161.00โ–บ
โ—„strength_clip_161.00โ–บ
โ—„lora_17noneโ–บ
โ—„strength_model_171.00โ–บ
โ—„strength_clip_171.00โ–บ
โ—„lora_18noneโ–บ
โ—„strength_model_181.00โ–บ
โ—„strength_clip_181.00โ–บ
โ—„lora_19noneโ–บ
โ—„strength_model_191.00โ–บ
โ—„strength_clip_191.00โ–บ
โ—„lora_20noneโ–บ
โ—„strength_model_201.00โ–บ
โ—„strength_clip_201.00โ–บ

This is the one you reach for when you're testing LoRAs. Instead of picking one, Loop Lora Selector runs all the LoRAs you list - one after another, same prompt, same seed - so you get a side-by-side sheet of what each one does. The author's headline use case is dead-on: checking whether a LoRA you just trained came out under-trained, over-trained, or just right, by looping the same generation across your candidate epochs and eyeballing the difference. That's a workflow every LoRA trainer does constantly, and doing it by hand is miserable.

It's also great for comparing a shelf of style LoRAs against one fixed base image.

How it works

You declare a slot count and fill in LoRAs, each with its own strength pair. The node then outputs a list - model, clip, and metadata for every LoRA in the batch - and ComfyUI iterates the downstream graph once per item. Keep your seed and prompt fixed and the only thing changing between images is the LoRA, which is exactly the controlled comparison you want. Crucially, each slot has its own strength_model and strength_clip, so you can loop the same LoRA at several strengths to find its sweet spot, or loop different LoRAs each at their own tuned weight.

The inputs and outputs that matter

  • number_of_loras (INT, default 3) - how many slots, up to 20.
  • model (MODEL) and clip (CLIP) - the base each LoRA patches.
  • lora_1 โ€ฆ lora_20 (dropdowns) - your candidates; they show "none" until you have LoRA files installed.
  • strength_model_N / strength_clip_N (FLOAT, default 1.0) - a per-slot strength pair. This is the key difference from the random selector, which shares one strength across the pool. Here every LoRA (or every strength you're testing) gets its own.

Outputs are all lists: model, clip, lora_path, lora_name, lora_folder. Wire model/clip into your sampler as usual, and route lora_name into a Show or a filename so each image in the sweep is labelled with the LoRA that made it - otherwise you'll have a grid you can't tell apart.

How to install it

ComfyUI Manager โ†’ Bjornulf_custom_nodes โ†’ install โ†’ restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/justUmen/Bjornulf_custom_nodes
pip install -r Bjornulf_custom_nodes/requirements.txt

then restart. No special dependency beyond ComfyUI's LoRA handling.

Common issues & troubleshooting

The images look different for reasons other than the LoRA. Pin your seed and don't touch the prompt across the loop. If the seed randomizes, you're comparing noise as much as LoRAs and the test is worthless.

I can't tell which image used which LoRA. Route the lora_name list output into a Show text node or bake it into the save filename. The whole point of a comparison is knowing what you're looking at.

Slots say "none." No LoRA files in models/loras. Add them and refresh.

Testing training epochs - which one's best? Per the LoRA-training KB, the last epoch usually isn't the best, which is exactly why people save intermediates and loop them. Load several epochs into the slots, loop, and pick by eye. If a candidate bleeds style even at low strength it's over-trained; if the concept barely shows at strength 1.0 it's under-trained.

It's slow. You're running N full generations - that's inherent to a sweep. Test at low steps / small resolution first, then re-run the winner at full quality.

CategoryBjornulf

Inputs (63)

NameTypeDefaultDescription
number_of_lorasINT31โ€“20โ€”
modelMODELโ€”
clipCLIPโ€”
lora_1optCOMBOnone1 options: none
strength_model_1optFLOAT1.00-100โ€“100โ€”
strength_clip_1optFLOAT1.00-100โ€“100โ€”
lora_2optCOMBOnone1 options: none
strength_model_2optFLOAT1.00-100โ€“100โ€”
strength_clip_2optFLOAT1.00-100โ€“100โ€”
lora_3optCOMBOnone1 options: none
strength_model_3optFLOAT1.00-100โ€“100โ€”
strength_clip_3optFLOAT1.00-100โ€“100โ€”
lora_4optCOMBOnone1 options: none
strength_model_4optFLOAT1.00-100โ€“100โ€”
strength_clip_4optFLOAT1.00-100โ€“100โ€”
lora_5optCOMBOnone1 options: none
strength_model_5optFLOAT1.00-100โ€“100โ€”
strength_clip_5optFLOAT1.00-100โ€“100โ€”
lora_6optCOMBOnone1 options: none
strength_model_6optFLOAT1.00-100โ€“100โ€”
strength_clip_6optFLOAT1.00-100โ€“100โ€”
lora_7optCOMBOnone1 options: none
strength_model_7optFLOAT1.00-100โ€“100โ€”
strength_clip_7optFLOAT1.00-100โ€“100โ€”
lora_8optCOMBOnone1 options: none
strength_model_8optFLOAT1.00-100โ€“100โ€”
strength_clip_8optFLOAT1.00-100โ€“100โ€”
lora_9optCOMBOnone1 options: none
strength_model_9optFLOAT1.00-100โ€“100โ€”
strength_clip_9optFLOAT1.00-100โ€“100โ€”
lora_10optCOMBOnone1 options: none
strength_model_10optFLOAT1.00-100โ€“100โ€”
strength_clip_10optFLOAT1.00-100โ€“100โ€”
lora_11optCOMBOnone1 options: none
strength_model_11optFLOAT1.00-100โ€“100โ€”
strength_clip_11optFLOAT1.00-100โ€“100โ€”
lora_12optCOMBOnone1 options: none
strength_model_12optFLOAT1.00-100โ€“100โ€”
strength_clip_12optFLOAT1.00-100โ€“100โ€”
lora_13optCOMBOnone1 options: none
strength_model_13optFLOAT1.00-100โ€“100โ€”
strength_clip_13optFLOAT1.00-100โ€“100โ€”
lora_14optCOMBOnone1 options: none
strength_model_14optFLOAT1.00-100โ€“100โ€”
strength_clip_14optFLOAT1.00-100โ€“100โ€”
lora_15optCOMBOnone1 options: none
strength_model_15optFLOAT1.00-100โ€“100โ€”
strength_clip_15optFLOAT1.00-100โ€“100โ€”
lora_16optCOMBOnone1 options: none
strength_model_16optFLOAT1.00-100โ€“100โ€”
strength_clip_16optFLOAT1.00-100โ€“100โ€”
lora_17optCOMBOnone1 options: none
strength_model_17optFLOAT1.00-100โ€“100โ€”
strength_clip_17optFLOAT1.00-100โ€“100โ€”
lora_18optCOMBOnone1 options: none
strength_model_18optFLOAT1.00-100โ€“100โ€”
strength_clip_18optFLOAT1.00-100โ€“100โ€”
lora_19optCOMBOnone1 options: none
strength_model_19optFLOAT1.00-100โ€“100โ€”
strength_clip_19optFLOAT1.00-100โ€“100โ€”
lora_20optCOMBOnone1 options: none
strength_model_20optFLOAT1.00-100โ€“100โ€”
strength_clip_20optFLOAT1.00-100โ€“100โ€”

Outputs (5)

NameTypeDescription
modelMODELโ€”
clipCLIPโ€”
lora_pathSTRINGโ€”
lora_nameSTRINGโ€”
lora_folderSTRINGโ€”