Lora Load With Trigger
Get the trigger words out of your LoRA filename — Lora Load With Trigger
- lora_name
- strength
- trigger_words
Every LoRA you've ever downloaded has a trigger word, and half the battle of using one is remembering what it is. There's a community convention for solving this at the source: people name their LoRA files with the trigger words in square brackets - ch9ractername_style.safetensors becomes mychar [ch9ractername] style.safetensors. wcx_LoraLoadWithTrigger reads that convention back out. Pick a LoRA from the dropdown and it hands you the filename, the strength, and whatever trigger words were stashed in square brackets - ready to drop into your prompt.
Here's the mechanism: it pulls the list of installed LoRAs from ComfyUI's models/loras folder (the same list the standard LoraLoader uses), and when you pick one, it runs a regex over the filename looking for [...] groups. Every match becomes part of the trigger_words output, comma-joined. No brackets in the name means you get a single space and the node is just a pretty LoRA picker.
Inputs are the two you'd expect: lora_name (dropdown of your installed LoRAs) and strength (default 1.0, range −10 to 10). Outputs are lora_name (STRING), strength (FLOAT), and trigger_words (STRING). It's an output node, so it renders a result panel in addition to exposing the sockets - which is where you'll actually read the trigger words.
The honest caveat, and it's a big one: this node does not load the LoRA into your model. It's a metadata and prompt helper. The actual LoRA still has to be applied by a regular LoraLoader on the MODEL/CLIP side of your graph. What this node gives you is the trigger words at a glance - and a STRING output you can wire into a prompt builder or text concat so the trigger ends up in your positive prompt automatically. Think of it as the world's most specific LoRA documentation node, not a replacement loader.
Where people get tripped up:
- It only works with the bracket naming convention. Download a LoRA named
mycoolstyle.safetensorswith no brackets and this node has nothing to extract - you're back to reading the CivitAI page. The bracket convention is community-driven (rgthree's Power Lora Loader does similar trigger-word reading), so it's not universal. - The trigger is whatever's in the filename, not the model metadata. If the filename lies, the trigger lies. Rename responsibly.
- It won't help you apply strength either. The strength output is just the number you typed, passed through. It's for wiring into your own logic, not for controlling the model.
Standard light install:
# ComfyUI Manager: search "ComfyUI-Practical-Tools" → Install → restart
# or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/wenchengxiang/ComfyUI-Practical-Tools
# restart ComfyUI
No dependencies, no models to download. For a pack's niche little node, this one genuinely saves me from retyping trigger words - as long as I'm honest with myself about which of my LoRAs were named by people who follow the convention.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| lora_name | COMBO | 0 options: | |
| strength | FLOAT | 1.00-10–10 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| lora_name | STRING | — |
| strength | FLOAT | — |
| trigger_words | STRING | — |