Nodes/Santodan Random LoRA Node/Random LoRA Folder to Model Selector
ComfyUI Node

Random LoRA Folder to Model Selector

Folder roulette, applied for you

By Santodan·Created about a year ago·Updated 2 months ago· 28
Random LoRA Folder to Model Selector
  • model
  • clip
  • exclude_loras_from_node
  • MODEL
  • CLIP
  • applied_loras
  • trigger_words
  • help_text
exclusive_mode
refresh_lorasfalse
force_refresh_cachefalse
extra_trigger_words
folder_path_1
lora_count_11
min_strength_10.60
max_strength_11.00
folder_path_2
lora_count_21
min_strength_20.60
max_strength_21.00
folder_path_3
lora_count_31
min_strength_30.60
max_strength_31.00
folder_path_4
lora_count_41
min_strength_40.60
max_strength_41.00
folder_path_5
lora_count_51
min_strength_50.60
max_strength_51.00
folder_path_6
lora_count_61
min_strength_60.60
max_strength_61.00
folder_path_7
lora_count_71
min_strength_70.60
max_strength_71.00
folder_path_8
lora_count_81
min_strength_80.60
max_strength_81.00
folder_path_9
lora_count_91
min_strength_90.60
max_strength_91.00
folder_path_10
lora_count_101
min_strength_100.60
max_strength_101.00

The Folder Selector and its "to Model" twin solve the same problem: draw random LoRAs from your folder structure and stop curating a shortlist. This one is the folder version that applies the winners straight into your MODEL and CLIP instead of handing you a lora_stack. Pick folders, get a model with mystery LoRAs baked in, complete with their trigger words on the side so you're not flying blind.

If the folder selector is the "explore my library" node, this is the "explore my library without adding a Comfyroll node to the graph" version. The trade-off is you lose the ability to inspect the stack before it commits - the LoRAs go in as they're drawn.

How it works

Same machinery as RandomLoRAFolder, but with a different folder source: the dropdown list is built from ComfyUI's get_filename_list("loras"), which includes [root] plus every subfolder it knows about (via extra_model_paths.yaml if you use one). Each of the ten slots picks lora_count files at random from its folder, samples a strength per file within that slot's min/max range, and applies each one via ComfyUI's built-in LoraLoader.load_lora.

Seeding works like the rest of the pack: refresh_loras off means the same folder choices re-roll the same winners; on means fresh every run. force_refresh_cache clears the trigger-word cache. exclusive_mode On reduces everything to a single winner across all collected entries.

Inputs that matter

  • model, clip - required inputs; the pipeline getting the LoRAs.
  • folder_path_1folder_path_10 - dropdowns of [root] and your lora subfolders.
  • lora_count_1 … - draws per folder (up to 99 per slot, though realistic counts stay low).
  • min/max_strength_N - per-slot strength range.
  • refresh_loras, force_refresh_cache, exclusive_mode - the usual three.
  • exclude_loras_from_node - a LORA_LIST (from the pack's ExcludedLoras) of files to skip by basename.
  • extra_trigger_words - appended to the trigger output.

Outputs: MODEL, CLIP, applied_loras (name (strength) per applied file), trigger_words, and help_text.

Gotchas worth knowing

  • Stacking overshoots fast. This applies every winner, and unlike a stack you can't easily pull one out after the fact. If you tell it to draw 5 from one folder and 4 from another with default strengths up to 1.0, you've got nine LoRAs fighting each other. Start with lora_count at 1–2 per folder.
  • The dropdown reflects what ComfyUI knows, not just disk. Stability Matrix users in the author's thread hit a folder picker stuck on "None" because their shared models dir exposed lora (singular) instead of loras. Check your model paths config before blaming the node.
  • Wrong-base LoRAs are your problem, not the node's. Folder roulette happily draws Illustrious LoRAs for an SDXL checkpoint. The trigger words tell you what a file is for; it won't tell you it's for a different architecture.

Install

ComfyUI Manager (search "Santodan"), or:

cd ComfyUI/custom_nodes
git clone https://github.com/Santodan/santodan-custom-nodes-comfyui

Restart. No dependencies or downloads - it reads your existing loras folder, with one CivitAI metadata lookup per uncached file on first runs.

CategorySantodan/LoRA

Inputs (47)

NameTypeDefaultDescription
modelMODEL
clipCLIP
exclusive_modeCOMBO2 options: Off, On
refresh_lorasBOOLEANfalse
force_refresh_cacheBOOLEANfalse
extra_trigger_wordsoptSTRING
exclude_loras_from_nodeoptLORA_LIST
folder_path_1optCOMBO2 options: None, [root]
lora_count_1optINT11–99
min_strength_1optFLOAT0.60-10–10
max_strength_1optFLOAT1.00-10–10
folder_path_2optCOMBO2 options: None, [root]
lora_count_2optINT11–99
min_strength_2optFLOAT0.60-10–10
max_strength_2optFLOAT1.00-10–10
folder_path_3optCOMBO2 options: None, [root]
lora_count_3optINT11–99
min_strength_3optFLOAT0.60-10–10
max_strength_3optFLOAT1.00-10–10
folder_path_4optCOMBO2 options: None, [root]
lora_count_4optINT11–99
min_strength_4optFLOAT0.60-10–10
max_strength_4optFLOAT1.00-10–10
folder_path_5optCOMBO2 options: None, [root]
lora_count_5optINT11–99
min_strength_5optFLOAT0.60-10–10
max_strength_5optFLOAT1.00-10–10
folder_path_6optCOMBO2 options: None, [root]
lora_count_6optINT11–99
min_strength_6optFLOAT0.60-10–10
max_strength_6optFLOAT1.00-10–10
folder_path_7optCOMBO2 options: None, [root]
lora_count_7optINT11–99
min_strength_7optFLOAT0.60-10–10
max_strength_7optFLOAT1.00-10–10
folder_path_8optCOMBO2 options: None, [root]
lora_count_8optINT11–99
min_strength_8optFLOAT0.60-10–10
max_strength_8optFLOAT1.00-10–10
folder_path_9optCOMBO2 options: None, [root]
lora_count_9optINT11–99
min_strength_9optFLOAT0.60-10–10
max_strength_9optFLOAT1.00-10–10
folder_path_10optCOMBO2 options: None, [root]
lora_count_10optINT11–99
min_strength_10optFLOAT0.60-10–10
max_strength_10optFLOAT1.00-10–10

Outputs (5)

NameTypeDescription
MODELMODEL
CLIPCLIP
applied_lorasSTRING
trigger_wordsSTRING
help_textSTRING