LoRA Loader With Trigger
Stop forgetting your LoRA trigger words — this loader shows them to you
- model
- clip
- MODEL
- CLIP
Every LoRA has a trigger word, and you only remember the trigger word for the LoRA you aren't using right now. That's the exact problem LoRA Loader With Trigger is built around: the standard ComfyUI LoraLoader, plus a visible, read-only text box showing the trigger words for whichever LoRA you've got selected, and a "Copy Trigger" button to paste them into your prompt.
One thing to know up front: it does not inject the trigger words into your prompt for you. It's a memory aid and a clipboard, not an automation node - the author frames it as "adding a display-note function to the LoRA loader," and that's exactly what it is.
What it actually is
A drop-in swap for the core LoraLoader. The load path is identical: it takes your model and clip, applies the LoRA from lora_name via the same load_lora_for_models call the core node uses, and hands back MODEL and CLIP outputs that wire into your sampler exactly like the built-in node. The math is untouched - you lose nothing by using this instead of the stock loader.
The clever bit is the front end. JavaScript watches the lora_name dropdown, fetches a mapping table from a tiny endpoint the pack registers on ComfyUI's server (/lora_trigger_map), and fills the trigger box whenever you change the LoRA. It also locks the box read-only and appends the copy button. Fully local, no API keys, no model downloads, no requirements.txt at all - refreshingly, this is one of the rare custom nodes that can't break your Python environment.
The inputs that matter
Same five inputs as the core loader, plus one that behaves differently than it looks:
- lora_name - the dropdown of every LoRA in your
models/lorasfolder. This is the one you'll actually touch. - strength_model / strength_clip - both default to 1.0, range −10 to 10, step 0.01. Same weight-tuning controls as the core loader.
- trigger_words - technically an optional input, practically a display widget. It's a multiline string, but the JavaScript forces it read-only, and the loader function ignores its value entirely. It exists so you can see (and copy) what the node thinks the trigger is.
- model / clip - feed it from your checkpoint loader, same as any LoRA loader.
Outputs are the standard MODEL and CLIP, which go to your sampler (and, if you're prompt-editing, your text encoders).
Feeding it your trigger words
The mapping lives in a plain text file called lora_triggers.txt inside the custom node folder. One entry per line, format filename.safetensors="trigger text":
my-character-lora.safetensors="character name, ahoge, twintails"
style-lora.safetensors="style name"
Actual newlines inside the quotes work for long organized prompt blocks - the pack parses with a CSV reader that respects the quote characters. Filenames are matched case-insensitively.
To build the skeleton, the pack ships a Windows batch file, 生成触发词模板.bat. Copy it into your loras folder, run it, and it writes a triggers_template.txt to your Desktop listing every .safetensors and .ckpt as filename="". Fill in the quotes, save the result as lora_triggers.txt in the node folder. One trap: the README tells you to overwrite checkpoint_triggers.txt, but the code actually reads lora_triggers.txt - the README is wrong, trust the filename the Python imports. The README and batch script are in Chinese; that's fine to ignore as long as you follow the file format above.
Installing it
ComfyUI Manager, search "comfyui-lora-with-trigger", install, restart. Or the manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/sossuzumiyaharuhi/comfyui-lora-with-trigger
Then restart ComfyUI. No pip install, no model files, no config beyond optionally dropping in your own lora_triggers.txt.
Where people get burned
- "The trigger words didn't go into my prompt." By design. This node shows and copies; it never types for you.
- Editing
lora_triggers.txtdoesn't change anything. The Python side reads it once at startup, and the browser caches the map for the session. Edit, restart ComfyUI, reload the page. Clunky, but this is a hobby-scale tool. - Subfolder LoRAs don't match. If you organize
lorasinto subfolders, the dropdown value is a path likestyles/foo.safetensors, while the map keys are bare filenames, so the trigger box falls back to the default "未找到触发词" ("trigger word not found" - the author's placeholder, not an error). - The box fills with something unrelated when you first drop the node. The default is computed from the first LoRA in your folder listing; it corrects itself the moment you change the dropdown.
It's a niche QoL node, aimed squarely at people with big anime/Illustrious collections where every file has a trigger phrase you can't keep straight. If that's you, it's the rare loader that saves actual time. If you've got five LoRAs, the stock loader plus a notes file is fine - this is a convenience, not a capability.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| clip | CLIP | — | |
| lora_name | COMBO | 0 options: | |
| strength_model | FLOAT | 1.00-10–10 | — |
| strength_clip | FLOAT | 1.00-10–10 | — |
| trigger_wordsopt | STRING | 未找到触发词 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |
| CLIP | CLIP | — |