Randomize LoRAs
Let chance pick your LoRAs — and their weights — for you
- model
- clip
- model
- clip
- trigger_words
- chosen_loras
Normally a LoRA is a deliberate choice: you load one, type a trigger word, decide a strength, hit generate. Randomize LoRAs is the opposite - you hand it a pool of up to ten LoRA files and let a seeded dice roll decide which ones get applied and at what strength. It's LoRA roulette, and for exploration it's surprisingly good at surfacing combinations you'd never have stacked by hand.
Why LoRA roulette
Why would you want random? Because stacking LoRAs is genuinely unpredictable. Each one is a small patch to the model's attention layers, and they interact in ways nobody fully predicts - the knowledge base's own write-up on the subject is blunt about it: "interactions are unpredictable." So instead of agonizing over which three of your forty LoRAs go together, you let the node sample a subset and farm the results. When a roll lands, save the seed. That's the whole loop.
How it works
Here's the mechanism. You connect the model and clip outputs of your checkpoint loader into the node. Each of the ten slots has a LoRA dropdown (auto-populated from your models/loras folder), a min and max strength, and an optional trigger-words field. The node picks a random count between min_random and max_random, samples that many LoRAs (no repeats - and it dedupes the same file picked in two slots, a fix that landed in version 1.1.0), then rolls each one's strength uniformly between its min and max. It applies everything by calling ComfyUI's own LoraLoader under the hood, which is why this pack carries no dependency bloat.
The inputs you'll actually touch
The inputs you'll actually touch:
- seed - the reproducibility key. Same seed plus the same ten slots filled equals the same roll. The README's one caveat: keep the same selected LoRAs for that to hold.
- min_random / max_random - how many LoRAs get applied, from 1 to 10. Set both to 2 and you get exactly two every time; set them to 1 and 5 and the count itself becomes random.
- lora_x + min_str_x + max_str_x - the pool. Each slot's strength range defaults to 0.5–1.0.
The outputs everyone misses
Then there are the two outputs people miss. trigger_words gives you the deduped, sorted trigger words of whatever got picked - paste that into your prompt so the LoRAs actually do anything (the classic "my LoRA does nothing" failure is a missing trigger word). chosen_loras hands you the exact <lora:name:strength> strings for the roll, which is gold for pasting into metadata or a Show Text node so you can record what worked. And of course model and clip wire straight into your KSampler.
Before you trust it
Three things to know before you trust it. First, the strength range goes to -10 and 10 - negative strengths invert a LoRA's effect, and you do not want a random roll of -8. Set min_str to 0 or above. Second, the same-seed correlation again: two RandomizeLoras nodes sharing a seed roll the same subset. Third, if you leave every slot on "None" the node passes model and clip through untouched - useful as a bypass, but easy to mistake for a broken workflow.
Installing
Install via ComfyUI Manager (search "unwdef") or:
cd ComfyUI/custom_nodes
git clone https://github.com/unwdef/unwdef-nodes-comfyui.git
Restart ComfyUI. No pip install, no model downloads - the whole pack is plain Python on ComfyUI core. Updates are a git pull in that folder and a restart.
Inputs (45)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| clip | CLIP | — | |
| seed | INT | 00–18446744073709550000 | — |
| min_random | INT | 11–10 | — |
| max_random | INT | 101–10 | — |
| lora_1 | COMBO | 1 options: None | |
| min_str_1 | FLOAT | 0.50-10–10 | — |
| max_str_1 | FLOAT | 1.00-10–10 | — |
| trigger_words_1 | STRING | — | |
| lora_2 | COMBO | 1 options: None | |
| min_str_2 | FLOAT | 0.50-10–10 | — |
| max_str_2 | FLOAT | 1.00-10–10 | — |
| trigger_words_2 | STRING | — | |
| lora_3 | COMBO | 1 options: None | |
| min_str_3 | FLOAT | 0.50-10–10 | — |
| max_str_3 | FLOAT | 1.00-10–10 | — |
| trigger_words_3 | STRING | — | |
| lora_4 | COMBO | 1 options: None | |
| min_str_4 | FLOAT | 0.50-10–10 | — |
| max_str_4 | FLOAT | 1.00-10–10 | — |
| trigger_words_4 | STRING | — | |
| lora_5 | COMBO | 1 options: None | |
| min_str_5 | FLOAT | 0.50-10–10 | — |
| max_str_5 | FLOAT | 1.00-10–10 | — |
| trigger_words_5 | STRING | — | |
| lora_6 | COMBO | 1 options: None | |
| min_str_6 | FLOAT | 0.50-10–10 | — |
| max_str_6 | FLOAT | 1.00-10–10 | — |
| trigger_words_6 | STRING | — | |
| lora_7 | COMBO | 1 options: None | |
| min_str_7 | FLOAT | 0.50-10–10 | — |
| max_str_7 | FLOAT | 1.00-10–10 | — |
| trigger_words_7 | STRING | — | |
| lora_8 | COMBO | 1 options: None | |
| min_str_8 | FLOAT | 0.50-10–10 | — |
| max_str_8 | FLOAT | 1.00-10–10 | — |
| trigger_words_8 | STRING | — | |
| lora_9 | COMBO | 1 options: None | |
| min_str_9 | FLOAT | 0.50-10–10 | — |
| max_str_9 | FLOAT | 1.00-10–10 | — |
| trigger_words_9 | STRING | — | |
| lora_10 | COMBO | 1 options: None | |
| min_str_10 | FLOAT | 0.50-10–10 | — |
| max_str_10 | FLOAT | 1.00-10–10 | — |
| trigger_words_10 | STRING | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |
| clip | CLIP | — |
| trigger_words | STRING | — |
| chosen_loras | STRING | — |