Nodes/ComfyUI-ComfyUI-NoelTextUtil/LoRA Trigger Injector
ComfyUI Node

LoRA Trigger Injector

Auto-Inject LoRA Triggers Into Your Prompt

By noelkim12·Created 12 months ago·Updated 12 months ago· 1
LoRA Trigger Injector
  • lora_stack
  • lora_stack
  • positive_prompt
  • injected_triggers
lora_count5
dedupetrue
modeappend
positive_prompt
lora_1_name
lora_1_triggers
lora_2_name
lora_2_triggers
lora_3_name
lora_3_triggers
lora_4_name
lora_4_triggers
lora_5_name
lora_5_triggers
lora_6_name
lora_6_triggers
lora_7_name
lora_7_triggers
lora_8_name
lora_8_triggers
lora_9_name
lora_9_triggers
lora_10_name
lora_10_triggers
lora_11_name
lora_11_triggers
lora_12_name
lora_12_triggers
lora_13_name
lora_13_triggers
lora_14_name
lora_14_triggers
lora_15_name
lora_15_triggers
lora_16_name
lora_16_triggers
lora_17_name
lora_17_triggers
lora_18_name
lora_18_triggers
lora_19_name
lora_19_triggers
lora_20_name
lora_20_triggers
lora_21_name
lora_21_triggers
lora_22_name
lora_22_triggers
lora_23_name
lora_23_triggers
lora_24_name
lora_24_triggers
lora_25_name
lora_25_triggers
lora_26_name
lora_26_triggers
lora_27_name
lora_27_triggers
lora_28_name
lora_28_triggers
lora_29_name
lora_29_triggers
lora_30_name
lora_30_triggers
lora_31_name
lora_31_triggers
lora_32_name
lora_32_triggers
lora_33_name
lora_33_triggers
lora_34_name
lora_34_triggers
lora_35_name
lora_35_triggers
lora_36_name
lora_36_triggers
lora_37_name
lora_37_triggers
lora_38_name
lora_38_triggers
lora_39_name
lora_39_triggers
lora_40_name
lora_40_triggers
lora_41_name
lora_41_triggers
lora_42_name
lora_42_triggers
lora_43_name
lora_43_triggers
lora_44_name
lora_44_triggers
lora_45_name
lora_45_triggers
lora_46_name
lora_46_triggers
lora_47_name
lora_47_triggers
lora_48_name
lora_48_triggers
lora_49_name
lora_49_triggers
lora_50_name
lora_50_triggers

The most annoying part of a LoRA workflow isn't the LoRA - it's the trigger word. The card says "use risu in your prompt," and you either remember to type it or you don't, and when you're stacking six LoRAs you definitely don't. The LoRA Trigger Injector (NoelLoRATriggerInjector) is a small text utility that reads which LoRAs are actually active in your workflow and splices their trigger words into your positive prompt for you. Configure each LoRA's trigger once; from then on, flipping LoRAs on and off in your stack updates the prompt automatically. No more cross-checking CivitAI cards mid-batch.

Keeping track of trigger words across a growing LoRA folder is a real, constant community pain - it's half the reason rgthree's Power Lora Loader reads them off files for you. This node is the "set it and forget it" version of that idea, aimed squarely at the Efficiency Nodes crowd.

How it works

The node sits between your LoRA stacker and the sampler. It takes a LORA_STACK - the exact type emitted by LoRA_Stacker_ED, which is why the pack's README tips its hat to NyaamZ's efficiency-nodes-ED fork - plus a positive_prompt. You define slots: pick a LoRA in lora_1_name and type its trigger words into lora_1_triggers (comma or space separated). On every run it walks the incoming stack, finds entries whose name matches one of your configured slots, collects their triggers, and appends (or prepends) them to the prompt. Then it passes both the stack and the enriched prompt downstream.

Note what it does not do: it never applies a LoRA. It edits text only, and passes your LORA_STACK through untouched, so you still wire the stack from your stacker into whatever actually loads it.

Inputs that matter

  • lora_count (default 5, 1–50) - how many slots to show. The frontend (a bundled lti.js) hides and shows slots live, so crank it to 8 and a slot appears.
  • dedupe (default on) - skips a trigger that's already in your prompt.
  • mode - append (end of prompt) or prepend (start).
  • lora_stack + positive_prompt - technically optional, practically the whole point. No stack connected, no injection; you just get a passthrough.
  • lora_X_name / lora_X_triggers pairs - your trigger library, per slot.

Outputs: lora_stack (pass-through), positive_prompt (the enriched one), and injected_triggers - a single space-joined string of what got added, handy for a text-display node if you want to see the node working.

Installing it

It's part of the ComfyUI-NoelTextUtil pack, so install that once:

cd ComfyUI/custom_nodes
git clone https://github.com/noelkim12/ComfyUI-NoelTextUtil

then restart ComfyUI - or just search ComfyUI-ComfyUI-NoelTextUtil in ComfyUI Manager (the title is double-prefixed, don't let that throw you) and click Install. Zero model downloads and no Python dependencies beyond ComfyUI itself; the only thing to install separately is a stacker that emits LORA_STACK, i.e. Efficiency Nodes (ED) or a compatible fork.

Where people get burned

  • Exact-filename matching. The dropdown is populated from your loras folder, and matching compares the stack entry's name against it exactly. A renamed file or a stack built from a different name string silently produces no trigger - and with dedupe on you won't even see a duplicate to tip you off.
  • The trailing comma. The source appends a comma to the output prompt unconditionally, and injected_triggers is a plain string, not a list. Both are harmless in practice; just don't expect a typed list out of the third output.
  • It's niche by design. If you're on rgthree's Power Lora Loader, which already pulls trigger words off files and CivitAI, this node is redundant. Reach for it when you're living inside LoRA stackers and want prompts to stay honest with the stack.
CategoryNoel/LoRA

Inputs (105)

NameTypeDefaultDescription
lora_countINT51–50사용할 LoRA 슬롯 수
dedupeBOOLEANtrue중복 트리거 제거 (프롬프트에 이미 있는 트리거는 추가하지 않음)
modeCOMBOappend트리거 삽입 위치
lora_stackoptLORA_STACKLoRA_Stacker_ED로부터 받은 LORA_STACK
positive_promptoptSTRING트리거를 주입할 positive prompt
lora_1_nameoptCOMBO2 options: None,
lora_1_triggersoptSTRINGLoRA 1 트리거 (콤마나 공백으로 구분)
lora_2_nameoptCOMBO2 options: None,
lora_2_triggersoptSTRINGLoRA 2 트리거 (콤마나 공백으로 구분)
lora_3_nameoptCOMBO2 options: None,
lora_3_triggersoptSTRINGLoRA 3 트리거 (콤마나 공백으로 구분)
lora_4_nameoptCOMBO2 options: None,
lora_4_triggersoptSTRINGLoRA 4 트리거 (콤마나 공백으로 구분)
lora_5_nameoptCOMBO2 options: None,
lora_5_triggersoptSTRINGLoRA 5 트리거 (콤마나 공백으로 구분)
lora_6_nameoptCOMBO2 options: None,
lora_6_triggersoptSTRINGLoRA 6 트리거 (콤마나 공백으로 구분)
lora_7_nameoptCOMBO2 options: None,
lora_7_triggersoptSTRINGLoRA 7 트리거 (콤마나 공백으로 구분)
lora_8_nameoptCOMBO2 options: None,
lora_8_triggersoptSTRINGLoRA 8 트리거 (콤마나 공백으로 구분)
lora_9_nameoptCOMBO2 options: None,
lora_9_triggersoptSTRINGLoRA 9 트리거 (콤마나 공백으로 구분)
lora_10_nameoptCOMBO2 options: None,
lora_10_triggersoptSTRINGLoRA 10 트리거 (콤마나 공백으로 구분)
lora_11_nameoptCOMBO2 options: None,
lora_11_triggersoptSTRINGLoRA 11 트리거 (콤마나 공백으로 구분)
lora_12_nameoptCOMBO2 options: None,
lora_12_triggersoptSTRINGLoRA 12 트리거 (콤마나 공백으로 구분)
lora_13_nameoptCOMBO2 options: None,
lora_13_triggersoptSTRINGLoRA 13 트리거 (콤마나 공백으로 구분)
lora_14_nameoptCOMBO2 options: None,
lora_14_triggersoptSTRINGLoRA 14 트리거 (콤마나 공백으로 구분)
lora_15_nameoptCOMBO2 options: None,
lora_15_triggersoptSTRINGLoRA 15 트리거 (콤마나 공백으로 구분)
lora_16_nameoptCOMBO2 options: None,
lora_16_triggersoptSTRINGLoRA 16 트리거 (콤마나 공백으로 구분)
lora_17_nameoptCOMBO2 options: None,
lora_17_triggersoptSTRINGLoRA 17 트리거 (콤마나 공백으로 구분)
lora_18_nameoptCOMBO2 options: None,
lora_18_triggersoptSTRINGLoRA 18 트리거 (콤마나 공백으로 구분)
lora_19_nameoptCOMBO2 options: None,
lora_19_triggersoptSTRINGLoRA 19 트리거 (콤마나 공백으로 구분)
lora_20_nameoptCOMBO2 options: None,
lora_20_triggersoptSTRINGLoRA 20 트리거 (콤마나 공백으로 구분)
lora_21_nameoptCOMBO2 options: None,
lora_21_triggersoptSTRINGLoRA 21 트리거 (콤마나 공백으로 구분)
lora_22_nameoptCOMBO2 options: None,
lora_22_triggersoptSTRINGLoRA 22 트리거 (콤마나 공백으로 구분)
lora_23_nameoptCOMBO2 options: None,
lora_23_triggersoptSTRINGLoRA 23 트리거 (콤마나 공백으로 구분)
lora_24_nameoptCOMBO2 options: None,
lora_24_triggersoptSTRINGLoRA 24 트리거 (콤마나 공백으로 구분)
lora_25_nameoptCOMBO2 options: None,
lora_25_triggersoptSTRINGLoRA 25 트리거 (콤마나 공백으로 구분)
lora_26_nameoptCOMBO2 options: None,
lora_26_triggersoptSTRINGLoRA 26 트리거 (콤마나 공백으로 구분)
lora_27_nameoptCOMBO2 options: None,
lora_27_triggersoptSTRINGLoRA 27 트리거 (콤마나 공백으로 구분)
lora_28_nameoptCOMBO2 options: None,
lora_28_triggersoptSTRINGLoRA 28 트리거 (콤마나 공백으로 구분)
lora_29_nameoptCOMBO2 options: None,
lora_29_triggersoptSTRINGLoRA 29 트리거 (콤마나 공백으로 구분)
lora_30_nameoptCOMBO2 options: None,
lora_30_triggersoptSTRINGLoRA 30 트리거 (콤마나 공백으로 구분)
lora_31_nameoptCOMBO2 options: None,
lora_31_triggersoptSTRINGLoRA 31 트리거 (콤마나 공백으로 구분)
lora_32_nameoptCOMBO2 options: None,
lora_32_triggersoptSTRINGLoRA 32 트리거 (콤마나 공백으로 구분)
lora_33_nameoptCOMBO2 options: None,
lora_33_triggersoptSTRINGLoRA 33 트리거 (콤마나 공백으로 구분)
lora_34_nameoptCOMBO2 options: None,
lora_34_triggersoptSTRINGLoRA 34 트리거 (콤마나 공백으로 구분)
lora_35_nameoptCOMBO2 options: None,
lora_35_triggersoptSTRINGLoRA 35 트리거 (콤마나 공백으로 구분)
lora_36_nameoptCOMBO2 options: None,
lora_36_triggersoptSTRINGLoRA 36 트리거 (콤마나 공백으로 구분)
lora_37_nameoptCOMBO2 options: None,
lora_37_triggersoptSTRINGLoRA 37 트리거 (콤마나 공백으로 구분)
lora_38_nameoptCOMBO2 options: None,
lora_38_triggersoptSTRINGLoRA 38 트리거 (콤마나 공백으로 구분)
lora_39_nameoptCOMBO2 options: None,
lora_39_triggersoptSTRINGLoRA 39 트리거 (콤마나 공백으로 구분)
lora_40_nameoptCOMBO2 options: None,
lora_40_triggersoptSTRINGLoRA 40 트리거 (콤마나 공백으로 구분)
lora_41_nameoptCOMBO2 options: None,
lora_41_triggersoptSTRINGLoRA 41 트리거 (콤마나 공백으로 구분)
lora_42_nameoptCOMBO2 options: None,
lora_42_triggersoptSTRINGLoRA 42 트리거 (콤마나 공백으로 구분)
lora_43_nameoptCOMBO2 options: None,
lora_43_triggersoptSTRINGLoRA 43 트리거 (콤마나 공백으로 구분)
lora_44_nameoptCOMBO2 options: None,
lora_44_triggersoptSTRINGLoRA 44 트리거 (콤마나 공백으로 구분)
lora_45_nameoptCOMBO2 options: None,
lora_45_triggersoptSTRINGLoRA 45 트리거 (콤마나 공백으로 구분)
lora_46_nameoptCOMBO2 options: None,
lora_46_triggersoptSTRINGLoRA 46 트리거 (콤마나 공백으로 구분)
lora_47_nameoptCOMBO2 options: None,
lora_47_triggersoptSTRINGLoRA 47 트리거 (콤마나 공백으로 구분)
lora_48_nameoptCOMBO2 options: None,
lora_48_triggersoptSTRINGLoRA 48 트리거 (콤마나 공백으로 구분)
lora_49_nameoptCOMBO2 options: None,
lora_49_triggersoptSTRINGLoRA 49 트리거 (콤마나 공백으로 구분)
lora_50_nameoptCOMBO2 options: None,
lora_50_triggersoptSTRINGLoRA 50 트리거 (콤마나 공백으로 구분)

Outputs (3)

NameTypeDescription
lora_stackLORA_STACK
positive_promptSTRING
injected_triggersSTRING