GR Lora Randomizer
Pull random LoRAs from your collection instead of picking by hand
- model
- clip
- MODEL
- CLIP
- lora_info
If you've got a folder full of LoRAs and you're the type who queues a batch overnight just to see what combinations produce something interesting, this is built for exactly that. Instead of you hand-picking which LoRA(s) load, it grabs a random selection from your library - with a strength, a seed, and (if you want a fixed "always-on" layer on top) up to three explicitly chosen style LoRAs stacked over the random pull.
How it works
Point it at your model and CLIP, set num_loras to how many random LoRAs you want pulled per run, and it does the picking for you. subfolder lets you scope the random pool - root restricts it to LoRAs sitting directly in your loras folder rather than anywhere in subdirectories, None doesn't apply that restriction. strength sets the weight applied to whatever gets picked, and seed controls which LoRAs get chosen, the same way a seed controls sampling - same seed, same pull, every time.
The incremental toggle changes the whole character of the node: instead of randomly sampling your collection each run, it walks through your LoRAs in order, one (or num_loras) at a time, advancing on each queue - useful if the goal is "systematically try every LoRA I own" rather than "surprise me." reset_incremental snaps that internal position back to the start when you need to restart the sweep.
On top of the random or incremental pull, enable_style_lora unlocks three fixed slots - style_lora_1 through style_lora_2 and style_lora_2 and style_lora_3, each with its own strength - for a LoRA you always want applied regardless of what gets randomly picked, like a consistent art-style LoRA layered under whatever character or concept LoRA the randomizer surfaces that run.
Because you can't always tell from the output image alone which LoRAs a given run actually used, the node returns a lora_info string describing the pick - worth wiring into a text-preview or details-saver node so your random batches stay traceable back to what actually produced them.
The inputs and outputs that matter
model/clip(required) - what gets patched.num_loras(INT, default1, max10) andstrength(FLOAT,-10to10) - how many LoRAs get randomly pulled per run and at what weight.seed- controls which LoRAs get picked; reuse a seed to reproduce a specific random pull.incremental/reset_incremental- switch from random sampling to a systematic walk through your collection.enable_style_loraplusstyle_lora_1–3and their strengths - fixed LoRAs layered on top of the random/incremental pick.MODEL,CLIP(outputs) - patched, ready for your sampler and text encoder.lora_info(STRING, output) - what actually got picked, for logging or debugging a batch.
How to install it
Via ComfyUI Manager: search "GraftingRayman", install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/GraftingRayman/ComfyUI_GraftingRayman
then restart. Every node in the pack, including this one, needs OpenAI's CLIP package installed alongside ComfyUI's own:
# portable build
.\python_embeded\python.exe -m pip install git+https://github.com/openai/CLIP.git
# system python
pip install git+https://github.com/openai/CLIP.git
Common issues & troubleshooting
Nodes missing from search entirely. That's the CLIP install above, applying to the whole pack rather than this node specifically.
Same LoRAs keep getting picked. If seed isn't changing between queues, you'll get the exact same random pull every time - that's expected, not a bug. Wire it to a randomizing seed widget if you actually want fresh picks each run, and keep it fixed only when you deliberately want a reproducible batch.
Random pull is empty or errors. Check subfolder against where your LoRA files actually live - if you've scoped it to root but everything you own is organized into subfolders, the random pool has nothing to draw from.
Style LoRAs aren't applying. enable_style_lora has to be explicitly on - the three style slots do nothing while it's off, even if you've picked files and set strengths on them.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| clip | CLIP | — | |
| incremental | BOOLEAN | false | — |
| subfolder | COMBO | None | 2 options: None, root |
| num_loras | INT | 11–10 | — |
| strength | FLOAT | 1.00-10–10 | — |
| seed | INT | 00–18446744073709550000 | — |
| reset_incremental | BOOLEAN | false | — |
| enable_style_lora | BOOLEAN | true | — |
| style_lora_1 | COMBO | None | 1 options: None |
| style_lora_1_strength | FLOAT | 1.00-10–10 | — |
| style_lora_2 | COMBO | None | 1 options: None |
| style_lora_2_strength | FLOAT | 1.00-10–10 | — |
| style_lora_3 | COMBO | None | 1 options: None |
| style_lora_3_strength | FLOAT | 1.00-10–10 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |
| CLIP | CLIP | — |
| lora_info | STRING | — |