Nodes/Lora Stack Pack/Trigger Filter
ComfyUI Node

Trigger Filter

It deletes the words your LoRAs have in common

By makszlak·Created 24 days ago·Updated 10 days ago· 2
Trigger Filter
  • trigger_words_1
  • trigger_words_2
  • trigger_words_3
  • trigger_words_4
  • trigger_words_5
  • filtered_words
◄extra_words►

Five strings in, one string out, and the rule is almost petty: any word that shows up in more than one of the inputs is deleted. Only words that appear exactly once across everything connected survive.

That sounds like a bug report until you've seen what a LoRA's tag list actually looks like. Point the trigger outputs of a LoRA Stack Container at this node and each input is a comma-separated dump of the top 200 tags that LoRA was trained on - for a booru-style model, that's 1girl, solo, long hair, smile, ... before you get anywhere near a distinctive token. Concatenate three of those lists into a prompt and you've just tripled the weight on the vocabulary that every LoRA on your disk shares, which is the opposite of useful. The words unique to one list are the interesting ones. That's the whole idea.

It's also a specific answer to a real itch: LoRA stack tooling filled out through 2026, and "auto-pull the trigger words, hand me a cleaned list" is a feature several packs landed on independently. This node is just the filter step, with no opinion about how your prompt gets built.

The inputs that matter

word_list_1 through word_list_5 are optional STRING inputs - wire trigger_words_1..5 from one or more containers into them. They're sockets rather than text boxes (forceInput is set in the source), so if you want to type words in by hand, put them through a text or concat node first. You don't have to fill all five; one connected input works fine.

sort_mode is the only required input, with two values:

  • frequency_order (default) - keeps first-seen order, i.e. the order the words arrived in. That's meaningful only because the container's trigger strings are already sorted by training-image count, so the most-represented tag of the first list keeps its place at the front.
  • alphabetical - sorts the survivors A–Z.

The output is a single STRING, filtered_words, and it goes into CLIPTextEncode.text. The pack's own example concatenates the survivors with a hand-written prompt and runs them through a Show Text node first - copy that, because you want to see the list once before you trust it.

Where it bites you

It will eat the exact trigger you needed. This is the big one. Filtering is case-insensitive and purely about whether a word occurs more than once, so if two of your LoRAs genuinely share a token, it's gone. A character LoRA plus a style LoRA trained on the same character will both list that character's tag; the filter removes it, and you get a lovely clean prompt with the identity stripped out. Two versions of the same LoRA do the same thing. Which is why you check the output before wiring it into your production graph.

Repeats inside one list count too. A word that appears twice within a single input string is also "not unique" and gets dropped.

Five inputs is five inputs. One container's five slots map perfectly onto them. Chain two containers for ten LoRAs, though, and you've got ten trigger strings for five sockets - you'll need a second filter, or a concat node to merge two lists into one socket (which is fine; the filter just sees a longer list).

It has no idea what a trigger word is. No stemming, no semantics, no comparison against trained_words. A useless generic tag that happens to appear in only one list sails through untouched. It's a dedupe filter; that it usually lands on the right answer is a property of how the lists are built, not of the filter.

The sort_mode dropdown may be hidden. The pack's frontend script is meant to replace it with a ⚙ Filter Settings popup, but the script isn't where ComfyUI looks for it, so you'll probably get the plain two-option dropdown instead - which is the better UI anyway. Want the popup? Copy lora_stack_pack.js into a web/js/ folder inside the pack and restart.

Install

ComfyUI Manager → search Lora Stack Pack (or ComfyUI_lora_stack_pack). Or:

cd ComfyUI/custom_nodes
git clone https://github.com/makszlak/ComfyUI_lora_stack_pack

Zero dependencies - no requirements.txt, an empty dependency list in pyproject.toml, nothing to download - so a restart is the whole install. The node sits under loaders/lora_stack alongside the pack's other two, and it's worth re-reading the trigger list once with a Show Text node after a workflow import, since a filter that silently removes a word leaves no trace in your prompt.

Categoryloaders/lora_stack

Inputs (6)

NameTypeDefaultDescription
extra_wordsSTRING—
trigger_words_1optLORA_TRIGGER_WORDS—
trigger_words_2optLORA_TRIGGER_WORDS—
trigger_words_3optLORA_TRIGGER_WORDS—
trigger_words_4optLORA_TRIGGER_WORDS—
trigger_words_5optLORA_TRIGGER_WORDS—

Outputs (1)

NameTypeDescription
filtered_wordsSTRING—