Nodes/DIGIT Nodes/DIGIT Trigger Preset
ComfyUI Node

DIGIT Trigger Preset

Stop retyping your trigger word every time you train a LoRA

By thedepartmentofexternalservices·Created 6 months ago·Updated 26 days ago· 0
DIGIT Trigger Preset
    • result
    • trigger_word
    • trigger_class
    • trigger_phrase
    actionpreview_injection
    preset_name
    description
    trigger_word
    trigger_class
    trigger_phrase
    test_texta photo of [trigger_phrase] standing in a field [trigger] in cinematic lighting a [trigger_class] portrait with dramatic shadows

    A trigger word is the whole point of a trained LoRA - the rare token that summons your subject, style, or concept. DIGIT Trigger Preset is the pack's little filing cabinet for that information: it saves and loads trigger word + class + phrase combos so every training run and every generation uses the exact same spelling. No more "wait, did I train it on ohwx or ohWX?" mid-training.

    The lora-training KB essay is worth remembering here: trigger words should be rare alphanumeric tokens outside natural vocabulary (ch9ractername, styl3name, ohwx) to avoid colliding with real words. This node exists precisely so that decision gets made once and reused.

    The inputs

    • action - save, load, list, delete, or preview_injection (the default).
    • trigger_word - the token itself (e.g. ohwx).
    • trigger_class - the class noun it stands in for: person, man, woman, dog, style, whatever the training subject is.
    • trigger_phrase - optional override for the full phrase; if you leave it empty the node auto-builds it as trigger_word + trigger_class.
    • test_text - a few template lines using [trigger], [trigger_class], and [trigger_phrase] placeholders. preview_injection fills them in so you can see the phrase exactly as it'll appear in prompts before you save.
    • preset_name / description - for save/load/list/delete.

    Outputs: result (status), plus trigger_word, trigger_class, and trigger_phrase as separate strings. Those are the outputs you wire into the LoRA Loader, Prompt Combine, or the sample-prompt machinery - the trainer writes digit_metadata.json with this trigger info, and the loader reads it back so generations use the same token the model was trained on.

    How it works

    Straightforward: preview_injection does a placeholder substitution on test_text so you can eyeball the final phrasing, and save/load/list/delete operate on the same local presets database the rest of the DIGIT training suite uses. Completely offline, no keys, no models.

    Where it fits

    The typical chain: define the trigger here once, save it, then build your DIGIT Sample Prompt Preset gallery around [trigger_phrase], and let the trainer and loader stay consistent across every run. The main gotcha is the same as all the preset nodes - the DB is local to the ComfyUI install, so if you train and generate on different machines, sync the preset folder or you'll quietly lose your trigger definitions. It's a small node that does one job, and for anyone training LoRAs regularly, it's the one that keeps every other prompt node honest.

    CategoryDIGIT

    Inputs (7)

    NameTypeDefaultDescription
    actionCOMBOpreview_injection5 options: save, load, list, delete, preview_injection
    preset_nameoptSTRING
    descriptionoptSTRING
    trigger_wordoptSTRING
    trigger_classoptSTRING
    trigger_phraseoptSTRING
    test_textoptSTRINGa photo of [trigger_phrase] standing in a field [trigger] in cinematic lighting a [trigger_class] portrait with dramatic shadows

    Outputs (4)

    NameTypeDescription
    resultSTRING
    trigger_wordSTRING
    trigger_classSTRING
    trigger_phraseSTRING