Nodes/Multiple LoRA Loader for ComfyUI/Trigger Words (by Index)
ComfyUI Node

Trigger Words (by Index)

Trigger Words on a Numbered Dial

By hubentu·Created about a year ago·Updated 12 months ago· 2
Trigger Words (by Index)
    • STRING
    index0
    triggerstrigger word 1 trigger word 2 trigger word 3

    Most LoRAs are dead weight in your prompt without their trigger word. You load the character, forget to type the trigger, and get a stranger in a bad outfit. This node takes a list of trigger words or phrases, one per line, and hands you the one you ask for by number. Index 0, first line. Index 1, second. A trigger word on a dial.

    It's a tiny thing, and it's best used as a pairing trick: set this node's index to the same number as the LoRA loader's index, keep both lists in the same order, and one integer now switches the whole character - LoRA and trigger together. Flip from character A to character B by bumping a single number instead of editing your prompt and your loader every time.

    How it works

    Nothing clever, which is the point. The triggers field is a plain multiline string. At execution it splits on newlines, strips whitespace, drops empty lines, and returns the line at index. Two behaviors worth knowing:

    • index −1 returns an empty string. A built-in "no trigger" setting, handy when one of your LoRAs doesn't want one.
    • Out-of-range index falls back to 0, with a console message. No error, no red node - just line 1.

    The inputs

    • triggers - multiline text, one trigger word or phrase per line. This is the whole node's data.
    • index - which line to return, 0 to 99.

    Output: a single STRING with the selected trigger.

    Wiring it in - the one real trap

    A STRING output that you connect into your CLIP Text Encode replaces that node's prompt text. Wire this straight in and your entire positive prompt becomes just the trigger word. To combine it with your normal prompt you need a text-concat node in between - paste your base prompt, add the trigger output, and feed the result into the encoder. If you're not planning to switch triggers dynamically, honestly just type the trigger into your prompt and skip this node entirely.

    Also remember the trigger itself is never validated. ComfyUI won't warn you that a trigger is misspelled or missing - the KB's LoRA troubleshooting checklist calls this out: most tools silently ignore a trigger that does nothing, so a typo here just quietly produces worse images.

    Installing it

    ComfyUI Manager, search "loras-loader" (or "Multiple LoRA Loader"), install, restart. By hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/hubentu/ComfyUI-loras-loader
    

    No dependencies, no model downloads - it's a string picker, and that's all it ever needs to be.

    Categoryutils

    Inputs (2)

    NameTypeDefaultDescription
    indexINT00–99
    triggersSTRINGtrigger word 1 trigger word 2 trigger word 3

    Outputs (1)

    NameTypeDescription
    STRINGSTRING