LoRa Loader with Trigger DB
The LoRA loader that remembers your trigger words
- model
- model
- all_triggers
- active_triggers
You've got forty LoRAs and you cannot remember which one needs sdxl style, 1girl, ahoge and which one works naked. That's the exact pain this node exists for. It's a normal LoraLoader wearing a sidecar database: pick a LoRA in the dropdown and it swaps in that model's saved trigger words automatically, then hands you those words as string outputs to feed into a prompt combiner. If that's the whole game you're playing, it's genuinely handy. If you already live in rgthree's Power Lora Loader or Lora Manager, this is redundant - the author knows it, and so does the r/StableDiffusion crowd that received it with a warm "about damn time" back in July 2025.
The setup that makes sense: drop it in a workflow, pick your LoRA, hit 💾 Save Triggers once, and from then on switching LoRAs in the dropdown rewrites your prompt for you. The node never touches your prompt directly - no string manipulation happens inside it. It just passes trigger text through its outputs so you can wire them into a prompt builder like CR Combine Prompt and rebuild the final prompt on every swap.
How it actually works
Under the hood it's two things bolted together. First, a real LoRA loader: it reads the file with comfy.utils.load_torch_file and patches your model via comfy.sd.load_lora_for_models. Second, a JSON database at <ComfyUI>/user/default/user-db/lora-triggers.json, managed through custom backend endpoints that the bundled web extension calls whenever the LoRA dropdown changes.
Two details are worth knowing. The database tracks each LoRA by a content hash (file size plus the first and last megabyte), so your triggers survive renaming or moving the file - and it auto-migrates old entries from earlier versions. And the 🔍 Load Metadata button reads trigger words out of the LoRA file's own metadata without loading the whole thing into memory, looking for the keys Kohya leaves behind (ss_tag_frequency, ss_tag_strings, trained_words, or anything containing "trigger"/"word"), then strips the leading 1_-style numbering Kohya adds.
The inputs and outputs that matter
Most of the schema is stock loader stuff:
lora_name- the LoRA dropdownstrength_model- weight, −20 to 20, default 1.0. Zero is a clever mute switch: the model passes through untouched but the trigger outputs still flowall_triggers/active_triggers- the two multiline text fields you actually edit; "all" is the full keyword list, "active" is what you're currently using
Outputs: model (the patched model, straight into your sampler), plus all_triggers and active_triggers as strings. Note there's no CLIP input or output, and the code applies the LoRA with clip strength 0. For the vast majority of LoRAs that's irrelevant, but a text-encoder-heavy LoRA won't get its CLIP half applied - the stock loader does both.
Installing it
No pip dependencies, no model downloads, no API key. It's pure Python plus a small JS extension, riding on ComfyUI's bundled torch and safetensors. Easiest route is ComfyUI Manager → "Install via Git URL" with https://github.com/benstaniford/comfy-lora-loader-with-triggerdb, or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/benstaniford/comfy-lora-loader-with-triggerdb.git
Then restart ComfyUI. You'll find it under the loaders category.
Where people get burned
- The metadata button does nothing on files that carry no trigger metadata - old LoRAs and manually edited ones, which is most of them. Watch the console; it logs why. If a file has a
.civitai.infosidecar instead, this node won't read it (the author's own admission). - Unsaved text gets wiped. Switching LoRAs clears the fields when nothing is saved, so type-then-swap loses your work. Save before you navigate.
- Cloud boxes forget your DB. On a fresh RunPod or rented GPU,
lora-triggers.jsonisn't there - bring it along or your saved triggers vanish with the instance.
It's a one-trick node, but the trick is solid, and it's the friendliest way to make trigger words stop being a guess-and-check ritual.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| lora_name | COMBO | 0 options: | |
| strength_model | FLOAT | 1.00-20–20 | — |
| all_triggers | STRING | — | |
| active_triggers | STRING | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |
| all_triggers | STRING | — |
| active_triggers | STRING | — |