Nodes/AUN ComfyUI Nodes/Random LoRA Model Loader (Compact)
ComfyUI Node

Random LoRA Model Loader (Compact)

A random LoRA loader that carries its trigger words

By loz2754·Created 8 months ago·Updated a day ago· 5
Random LoRA Model Loader (Compact)
  • model
  • clip
  • MODEL
  • CLIP
  • selected LoRAs
  • index
  • label
  • trigger words
  • trigger + prompt
modeRandom
lora_1None
lora_2None
lora_3None
lora_4None
lora_5None
lora_6None
lora_7None
lora_8None
lora_9None
lora_10None
select1
minimum1
maximum3
range1,2,3
apply_loratrue
strength_model1.00
strength_clip1.00
base_prompt
selected_LoRAs
trigger_1
trigger_2
trigger_3
trigger_4
trigger_5
trigger_6
trigger_7
trigger_8
trigger_9
trigger_10

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 optional clip input; 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 optional base_prompt text, ready to append to your prompt or chain into another prompt builder.
  • index (INT) and label (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_clip only 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.

CategoryAUN Nodes/Loras

Inputs (32)

NameTypeDefaultDescription
modelMODEL
modeCOMBORandomSelect mode: fixed, incrementing, random, or explicit range list.
lora_1COMBONoneLoRA slot 1.
lora_2COMBONoneLoRA slot 2.
lora_3COMBONoneLoRA slot 3.
lora_4COMBONoneLoRA slot 4.
lora_5COMBONoneLoRA slot 5.
lora_6COMBONoneLoRA slot 6.
lora_7COMBONoneLoRA slot 7.
lora_8COMBONoneLoRA slot 8.
lora_9COMBONoneLoRA slot 9.
lora_10COMBONoneLoRA slot 10.
selectoptINT11–10Fixed slot index for Select mode.
minimumoptINT11–10Minimum slot index for Increment/Random (inclusive).
maximumoptINT31–10Maximum slot index for Increment/Random (inclusive).
rangeoptSTRING1,2,3Comma-separated list or ranges for Range mode (for example 1,3,5-6).
apply_loraoptBOOLEANtrueWhen disabled, returns the input model unchanged.
strength_modeloptFLOAT1.00-20–20LoRA strength applied to the model.
strength_clipoptFLOAT1.00-20–20LoRA strength applied to the clip when CLIP is connected.
clipoptCLIP
base_promptoptSTRINGOptional prompt text appended after trigger words.
selected_LoRAsoptSTRINGPass-through and concatenate selected_LoRAs text.
trigger_1optSTRINGTrigger words for LoRA slot 1.
trigger_2optSTRINGTrigger words for LoRA slot 2.
trigger_3optSTRINGTrigger words for LoRA slot 3.
trigger_4optSTRINGTrigger words for LoRA slot 4.
trigger_5optSTRINGTrigger words for LoRA slot 5.
trigger_6optSTRINGTrigger words for LoRA slot 6.
trigger_7optSTRINGTrigger words for LoRA slot 7.
trigger_8optSTRINGTrigger words for LoRA slot 8.
trigger_9optSTRINGTrigger words for LoRA slot 9.
trigger_10optSTRINGTrigger words for LoRA slot 10.

Outputs (7)

NameTypeDescription
MODELMODEL
CLIPCLIP
selected LoRAsSTRING
indexINT
labelSTRING
trigger wordsSTRING
trigger + promptSTRING