Random LoRA Model Loader (Compact)
A random LoRA loader that carries its trigger words
- model
- clip
- MODEL
- CLIP
- selected LoRAs
- index
- label
- trigger words
- trigger + prompt
LoRA exploration has a dirty secret: half the work is remembering which trigger words go with which LoRA. Random LoRA Model Loader (Compact) is AUN's answer - a single node with up to 10 LoRA slots, each carrying its own trigger words, that rolls a slot (Select, Increment, Random, or Range), applies that LoRA to your model, and hands you the trigger text ready to drop into your prompt. It's the random-selection take on the idea rgthree's Power Lora Loader popularized, with the trigger management baked in.
How it works
You load up to 10 lora_N slots (dropdowns populated from your loras folder), each with a trigger_N string. A mode picks how the active slot is chosen - Select (fixed select), Increment/Random (within minimum/maximum), or Range (1,3,5-6 style list). On run it applies that LoRA to the incoming model using strength_model, outputs the patched MODEL and CLIP (the CLIP gets strength_clip), and returns everything you need for prompt assembly.
The outputs are where this shines:
MODEL/CLIP- the LoRA-applied pair (CLIP only meaningful when you connect the optionalclipinput; without it, CLIP passes through).selected LoRAs(STRING) - the name of the active LoRA.trigger words(STRING) - the active slot's trigger text.trigger + prompt(STRING) - triggers plus the optionalbase_prompttext, ready to append to your prompt or chain into another prompt builder.index(INT) andlabel(STRING) - which slot won and its label, for downstream control or filenames.
Because trigger words usually need to be in the prompt for the LoRA to work, the base_prompt optional input is the smart touch: wire your normal prompt in, and trigger + prompt gives you the combined string - one wire into CLIP Text Encode instead of manual pasting.
The inputs that matter
mode,select,minimum,maximum,range- the selection logic (same family as the pack's index nodes).lora_N/trigger_N- the slots themselves. This is where you do the setup work.strength_model/strength_clip- LoRA strengths.strength_cliponly does anything when a CLIP is connected.apply_lora- master switch; off = returns the input model unchanged. Great for A/B "is the LoRA even helping" checks.
Compact mode, and the workflow it enables
Double-click the body (or right-click → Compact mode) to hide the config widgets; in compact mode the footer shows the active slot's trigger words, and you can hide/show clip strength and the footer from the right-click menu. Pair it with a PromptCycler or a Random/Select INT for the index, and you get rotating LoRA+prompt combos in one clean column.
Install
Part of AUN ComfyUI Nodes (loz2754):
cd ComfyUI/custom_nodes
git clone https://github.com/loz2754/AUN-ComfyUI-Nodes
or ComfyUI Manager → "AUN ComfyUI Nodes" → install → restart. Pack deps (piexif, opencv-python-headless, imageio-ffmpeg, requests) via Manager; no model downloads - it just reads whatever LoRAs are already in your ComfyUI/models/loras folder.
Gotchas
Trigger words only work if you actually use the trigger + prompt output - if you send your own static prompt to CLIP Text Encode, the triggers never land. And when the pack rolls a None slot (empty lora_N), it applies nothing; if a slot's LoRA seems to vanish, check whether that slot is filled. For stacking multiple LoRAs per prompt, the pack's Random Multi-LoRA Model Loader is the 20-prompt×3-slot version.
Inputs (32)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| mode | COMBO | Random | Select mode: fixed, incrementing, random, or explicit range list. |
| lora_1 | COMBO | None | LoRA slot 1. |
| lora_2 | COMBO | None | LoRA slot 2. |
| lora_3 | COMBO | None | LoRA slot 3. |
| lora_4 | COMBO | None | LoRA slot 4. |
| lora_5 | COMBO | None | LoRA slot 5. |
| lora_6 | COMBO | None | LoRA slot 6. |
| lora_7 | COMBO | None | LoRA slot 7. |
| lora_8 | COMBO | None | LoRA slot 8. |
| lora_9 | COMBO | None | LoRA slot 9. |
| lora_10 | COMBO | None | LoRA slot 10. |
| selectopt | INT | 11–10 | Fixed slot index for Select mode. |
| minimumopt | INT | 11–10 | Minimum slot index for Increment/Random (inclusive). |
| maximumopt | INT | 31–10 | Maximum slot index for Increment/Random (inclusive). |
| rangeopt | STRING | 1,2,3 | Comma-separated list or ranges for Range mode (for example 1,3,5-6). |
| apply_loraopt | BOOLEAN | true | When disabled, returns the input model unchanged. |
| strength_modelopt | FLOAT | 1.00-20–20 | LoRA strength applied to the model. |
| strength_clipopt | FLOAT | 1.00-20–20 | LoRA strength applied to the clip when CLIP is connected. |
| clipopt | CLIP | — | |
| base_promptopt | STRING | Optional prompt text appended after trigger words. | |
| selected_LoRAsopt | STRING | Pass-through and concatenate selected_LoRAs text. | |
| trigger_1opt | STRING | Trigger words for LoRA slot 1. | |
| trigger_2opt | STRING | Trigger words for LoRA slot 2. | |
| trigger_3opt | STRING | Trigger words for LoRA slot 3. | |
| trigger_4opt | STRING | Trigger words for LoRA slot 4. | |
| trigger_5opt | STRING | Trigger words for LoRA slot 5. | |
| trigger_6opt | STRING | Trigger words for LoRA slot 6. | |
| trigger_7opt | STRING | Trigger words for LoRA slot 7. | |
| trigger_8opt | STRING | Trigger words for LoRA slot 8. | |
| trigger_9opt | STRING | Trigger words for LoRA slot 9. | |
| trigger_10opt | STRING | Trigger words for LoRA slot 10. |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |
| CLIP | CLIP | — |
| selected LoRAs | STRING | — |
| index | INT | — |
| label | STRING | — |
| trigger words | STRING | — |
| trigger + prompt | STRING | — |