Nodes/ComfyUI FRED Nodes v2/πŸ‘‘ FRED Auto LoRA Loader 5 stacks (simple)
ComfyUI Node

πŸ‘‘ FRED Auto LoRA Loader 5 stacks (simple)

A LoRA loader with per-slot on/off/auto switches β€” the 'auto' is the point

By PoukpalaovaΒ·Created about a year agoΒ·Updated 7 months agoΒ· 3
πŸ‘‘ FRED Auto LoRA Loader 5 stacks (simple)
  • model
  • optional_clip
  • model
  • clip
  • lora_name_1
  • lora_weight_1
  • lora_name_2
  • lora_weight_2
  • lora_name_3
  • lora_weight_3
  • lora_name_4
  • lora_weight_4
  • lora_name_5
  • lora_weight_5
  • loras_infos
  • help
β—„toggleβ€”β–Ί
β—„text_promptβ€”β–Ί
β—„loras_infosβ–Ί
β—„switch_1offβ–Ί
β—„lora_name_1Noneβ–Ί
β—„lora_weight_11.00β–Ί
β—„search_word_1β–Ί
β—„switch_2offβ–Ί
β—„lora_name_2Noneβ–Ί
β—„lora_weight_21.00β–Ί
β—„search_word_2β–Ί
β—„switch_3offβ–Ί
β—„lora_name_3Noneβ–Ί
β—„lora_weight_31.00β–Ί
β—„search_word_3β–Ί
β—„switch_4offβ–Ί
β—„lora_name_4Noneβ–Ί
β—„lora_weight_41.00β–Ί
β—„search_word_4β–Ί
β—„switch_5offβ–Ί
β—„lora_name_5Noneβ–Ί
β—„lora_weight_51.00β–Ί
β—„search_word_5β–Ί

Stacking five LoRAs in ComfyUI is easy. Keeping them organized so you can toggle them in and out without a pile of bypass nodes is the actual work. FRED_AutoLoraLoader_5_stacks_simple gives you five slots, each with its own on/off/auto switch, its own weight, and - the party trick - an auto mode that turns a LoRA on only when its trigger word actually appears in your prompt.

How the slots work

Each slot has three things: a switch_1-style toggle (off / on / auto), a lora_name_1 picker, and a lora_weight_1. The weight range is -10 to +10, which covers negative-embedding-style effects and mild blending far more than the usual 0-2 slider, though you'll live in 0–1.5 like everyone else.

  • on - always applied at the set weight.
  • off - skipped entirely, no matter what.
  • auto - here's the clever part. It looks at search_word_1, splits it on commas, and if any of those words appear in the text_prompt you feed in, the LoRA activates. No trigger word in the prompt, no LoRA. This turns one fixed workflow into something that adapts to whatever you typed.

So you can park your style LoRA in slot 1 with search_word = oil painting, a character LoRA in slot 2 keyed to their name, and the same graph serves completely different results depending on the prompt. The loras_infos string input lets you hand it a ready-made config blob (the same format the FRED Image Saver v2 accepts) instead of configuring slots by hand - nice for reusing saved setups.

What comes out

  • model and clip - the loaded stack, wired straight into a KSampler just like any LoRA loader. optional_clip in, modified clip out.
  • lora_name_1..5 and lora_weight_1..5 - the actually applied names and weights, as STRING/FLOAT outputs. These are gold for the FRED Image Saver's %lora_name_1/%lora_weight_1 filename tokens, so your saved filenames reflect what really ran rather than what you configured.
  • loras_infos - a compact string describing the active stack, which you can feed straight back into another FRED loader or the v2 saver.

There's a top-level toggle boolean too - flip it off and the whole stack is skipped, which is your "compare with and without LoRAs" button. And as always, a help output spells out the wiring.

The catch

Auto mode is only as good as your search_word list. If your trigger word is "portrait" and half your prompts contain "portrait" for unrelated reasons, you'll get surprise LoRAs. Keep search words distinctive. Also note this is the simple variant - fixed five slots, one weight per slot. If you want up to ten slots with separate model/clip strengths, that's the Dynamic sibling node in the same pack.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/Poukpalaova/ComfyUI-FRED-Nodes_v2.git

Restart, or search "ComfyUI FRED Nodes v2" in ComfyUI Manager. No model files to download - LoRAs live in your normal models/loras folder and this node just reads the same folder list the stock loader does.

Gotchas

If a slot's lora_name says "None", that slot is skipped even in on mode - an empty slot isn't an error, it's just unused. And "auto" with an empty search_word behaves like "off"; there's nothing to match against. Set the word first, then flip to auto.

CategoryπŸ‘‘FRED/models/loras

Inputs (25)

NameTypeDefaultDescription
modelMODELβ€”
toggleBOOLEANβ€”
optional_clipoptCLIPβ€”
text_promptoptSTRINGβ€”
loras_infosoptSTRINGβ€”
switch_1optCOMBOoff3 options: auto, off, on
lora_name_1optCOMBONone1 options: None
lora_weight_1optFLOAT1.00-10–10β€”
search_word_1optSTRINGβ€”
switch_2optCOMBOoff3 options: auto, off, on
lora_name_2optCOMBONone1 options: None
lora_weight_2optFLOAT1.00-10–10β€”
search_word_2optSTRINGβ€”
switch_3optCOMBOoff3 options: auto, off, on
lora_name_3optCOMBONone1 options: None
lora_weight_3optFLOAT1.00-10–10β€”
search_word_3optSTRINGβ€”
switch_4optCOMBOoff3 options: auto, off, on
lora_name_4optCOMBONone1 options: None
lora_weight_4optFLOAT1.00-10–10β€”
search_word_4optSTRINGβ€”
switch_5optCOMBOoff3 options: auto, off, on
lora_name_5optCOMBONone1 options: None
lora_weight_5optFLOAT1.00-10–10β€”
search_word_5optSTRINGβ€”

Outputs (14)

NameTypeDescription
modelMODELβ€”
clipCLIPβ€”
lora_name_1STRINGβ€”
lora_weight_1FLOATβ€”
lora_name_2STRINGβ€”
lora_weight_2FLOATβ€”
lora_name_3STRINGβ€”
lora_weight_3FLOATβ€”
lora_name_4STRINGβ€”
lora_weight_4FLOATβ€”
lora_name_5STRINGβ€”
lora_weight_5FLOATβ€”
loras_infosSTRINGβ€”
helpSTRINGβ€”