Nodes/Bjornulf_custom_nodes/๐ŸŽฒ๐Ÿ‘‘ Random Lora Selector
ComfyUI Node

๐ŸŽฒ๐Ÿ‘‘ Random Lora Selector

Pick one LoRA at random from a shortlist

By justUmenยทCreated 2 years agoยทUpdated about a year agoยท 545
๐ŸŽฒ๐Ÿ‘‘ Random Lora Selector
  • model
  • clip
  • model
  • clip
  • lora_path
  • lora_name
  • lora_folder
โ—„number_of_loras3โ–บ
โ—„strength_model1.00โ–บ
โ—„strength_clip1.00โ–บ
โ—„lora_1noneโ–บ
โ—„lora_2noneโ–บ
โ—„lora_3noneโ–บ
โ—„lora_4noneโ–บ
โ—„lora_5noneโ–บ
โ—„lora_6noneโ–บ
โ—„lora_7noneโ–บ
โ—„lora_8noneโ–บ
โ—„lora_9noneโ–บ
โ—„lora_10noneโ–บ
โ—„seed0โ–บ

Line up a handful of LoRAs, run the graph, and get one of them applied at random. That's Random Lora Selector. It's the node for variety batches - you've got five style LoRAs and you want a grab-bag of outputs without manually swapping the loader each time, or you're auto-generating a big set and want the style to vary shot to shot. Set your candidates, let the seed pick.

Simple idea, and it slots neatly into the "randomize everything and see what falls out" style of prompt exploration.

How it works

You declare how many LoRA slots you want, fill them from the dropdowns, and on each run the node uses its seed to choose exactly one. It applies that LoRA to your MODEL and CLIP at the strengths you set, then passes the patched pair downstream - plus it tells you which one it picked via name/path/folder string outputs, so a random run is still traceable. One LoRA per run, chosen fresh when the seed randomizes.

The inputs and outputs that matter

  • number_of_loras (INT, default 3) - how many candidate slots to show, up to 20.
  • model (MODEL) and clip (CLIP) - what the chosen LoRA patches.
  • strength_model / strength_clip (FLOAT, default 1.0) - applied to whichever LoRA gets picked. Note these are single values shared across the pool, not per-LoRA - every candidate gets the same strength.
  • lora_1 โ€ฆ lora_10 (optional dropdowns) - your candidates. They read "none" until you actually have LoRA files in models/loras.
  • seed (INT) - drives the pick. Randomize for variety, fix to reproduce a specific draw.

Outputs: model and clip (patched, wire onward), plus lora_path, lora_name, and lora_folder strings so you can log or caption which LoRA won - feed lora_name into a Show node or a filename.

How to install it

ComfyUI Manager: search 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. Uses ComfyUI's own LoRA loading, no special dependency.

Common issues & troubleshooting

All the slots say "none." You have no LoRA files where ComfyUI looks (models/loras). Drop some in and refresh - the dropdowns populate from that folder.

It keeps picking the same LoRA. The seed control is fixed. Set it to randomize to draw a different one each run. Conversely, if you found a great random result, fix the seed to lock that pick.

Every LoRA comes out the same strength - I wanted different weights per LoRA. This node shares one strength across the pool by design. If you need per-LoRA strengths (say, to loop and test each at its own weight), use the pack's Loop Lora Selector, which exposes a strength pair for every slot.

One picked LoRA overpowers the image. Because strength is shared, a LoRA that's stronger-trained than its neighbours will look blown out at the same weight. Per the LoRA-training KB that's usually an over-trained LoRA; either lower the shared strength or drop that candidate from the pool.

I want all of them, not one. That's the loop node's job, not this one - Random Lora Selector is deliberately one-at-a-time.

CategoryBjornulf

Inputs (16)

NameTypeDefaultDescription
number_of_lorasINT31โ€“20โ€”
modelMODELโ€”
clipCLIPโ€”
strength_modelFLOAT1.00-100โ€“100โ€”
strength_clipFLOAT1.00-100โ€“100โ€”
lora_1optCOMBOnone1 options: none
lora_2optCOMBOnone1 options: none
lora_3optCOMBOnone1 options: none
lora_4optCOMBOnone1 options: none
lora_5optCOMBOnone1 options: none
lora_6optCOMBOnone1 options: none
lora_7optCOMBOnone1 options: none
lora_8optCOMBOnone1 options: none
lora_9optCOMBOnone1 options: none
lora_10optCOMBOnone1 options: none
seedoptINT00โ€“18446744073709550000โ€”

Outputs (5)

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