๐ฒ๐ Random Lora Selector
Pick one LoRA at random from a shortlist
- model
- clip
- model
- clip
- lora_path
- lora_name
- lora_folder
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) andclip(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 inmodels/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.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| number_of_loras | INT | 31โ20 | โ |
| model | MODEL | โ | |
| clip | CLIP | โ | |
| strength_model | FLOAT | 1.00-100โ100 | โ |
| strength_clip | FLOAT | 1.00-100โ100 | โ |
| lora_1opt | COMBO | none | 1 options: none |
| lora_2opt | COMBO | none | 1 options: none |
| lora_3opt | COMBO | none | 1 options: none |
| lora_4opt | COMBO | none | 1 options: none |
| lora_5opt | COMBO | none | 1 options: none |
| lora_6opt | COMBO | none | 1 options: none |
| lora_7opt | COMBO | none | 1 options: none |
| lora_8opt | COMBO | none | 1 options: none |
| lora_9opt | COMBO | none | 1 options: none |
| lora_10opt | COMBO | none | 1 options: none |
| seedopt | INT | 00โ18446744073709550000 | โ |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| model | MODEL | โ |
| clip | CLIP | โ |
| lora_path | STRING | โ |
| lora_name | STRING | โ |
| lora_folder | STRING | โ |