DIGIT Trigger Preset
Stop retyping your trigger word every time you train a LoRA
- result
- trigger_word
- trigger_class
- trigger_phrase
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, orpreview_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 astrigger_word + trigger_class.test_text- a few template lines using[trigger],[trigger_class], and[trigger_phrase]placeholders.preview_injectionfills 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.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| action | COMBO | preview_injection | 5 options: save, load, list, delete, preview_injection |
| preset_nameopt | STRING | — | |
| descriptionopt | STRING | — | |
| trigger_wordopt | STRING | — | |
| trigger_classopt | STRING | — | |
| trigger_phraseopt | STRING | — | |
| test_textopt | STRING | a photo of [trigger_phrase] standing in a field [trigger] in cinematic lighting a [trigger_class] portrait with dramatic shadows | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| result | STRING | — |
| trigger_word | STRING | — |
| trigger_class | STRING | — |
| trigger_phrase | STRING | — |