ComfyUI Extension: LoRa Loader with Trigger Database
A ComfyUI custom node that provides a LoRa loader with persistent trigger word storage. Automatically saves and loads trigger words for each LoRa model, making your workflow more efficient.
Custom Nodes (0)
README
LoRa Loader with Trigger Database
A ComfyUI custom node that provides a LoRa loader with persistent trigger word storage. Automatically saves and loads trigger words for each LoRa model, making your workflow more efficient.
Note: This node is designed to be used in conjunction with a prompt combiner node such as CR Combine Prompt. Use this node to manage and store trigger words, then connect its outputs to a prompt combiner to build your final prompt for generation.
Features
- Dual Trigger Fields: Separate "All Triggers" and "Active Triggers" text fields
- Auto-loading: Automatically loads saved triggers when selecting a LoRa
- Load/Save Buttons: Explicit buttons for loading and saving trigger words
- Persistent Database: Stores trigger words in JSON format between sessions in {Comfy}/models/loras/triggers.json
- Stores all/active triggers: Can be used to store all the triggers but also just the one you're currently using
Screenshot
LoRa loader with Trigger DB being used to apply triggers as part of a combination prompt with CR Combine Prompt:
Installation
Method 1: ComfyUI Manager (Recommended)
- Install via ComfyUI Manager using this Git URL:
https://github.com/benstaniford/comfy-lora-loader-with-triggerdb
Method 2: Manual Installation
- Clone into your ComfyUI custom_nodes folder:
cd ComfyUI/custom_nodes git clone https://github.com/benstaniford/comfy-lora-loader-with-triggerdb.git
- Restart ComfyUI
Usage
- Add the "LoRa Loader with Trigger DB" node from the "loaders" category
- Select a LoRa from the dropdown - triggers auto-load if fields are empty
- Use "All Triggers" for comprehensive trigger words, "Active Triggers" for current selection
- Click "📥 Load Triggers" to load saved data or "💾 Save Triggers" to save current data
- Connect outputs to your workflow
Node Details
Inputs:
model
: Base model to apply LoRa tolora_name
: LoRa selection dropdownstrength_model
: LoRa strength value (-20.0 to 20.0)all_triggers
: Text field for all available trigger wordsactive_triggers
: Text field for currently active trigger wordsclip
: (Optional) CLIP model input
Outputs:
model
: Model with LoRa appliedclip
: CLIP with LoRa appliedall_triggers
: All triggers as string outputactive_triggers
: Active triggers as string output
Database
Trigger words are stored in triggers.json
in your ComfyUI loras folder:
{
"lora_name": {
"all_triggers": "masterpiece, best quality, detailed",
"active_triggers": "masterpiece, best quality"
}
}
The database file is created automatically and handles migration from older formats.
License
This project is licensed under the same license as specified in the LICENSE file.