Install this extension via the ComfyUI Manager by searching
for ComfyUI-Lora-Auto-Trigger-Words
1. Click the Manager button in the main menu
2. Select Custom Nodes Manager button
3. Enter ComfyUI-Lora-Auto-Trigger-Words in the search bar
After installation, click the Restart button to
restart ComfyUI. Then, manually
refresh your browser to clear the cache and access
the updated list of nodes.
Visit
ComfyUI Online
for ready-to-use ComfyUI environment
ComfyUI-Lora-Auto-Trigger-Words is a project forked from LoadLoraWithTags, designed to provide custom nodes for easy access to tags that trigger a lora.
ComfyUI-Lora-Auto-Trigger-Words Introduction
ComfyUI-Lora-Auto-Trigger-Words is an extension designed to simplify the process of accessing and using trigger words for LoRA (Low-Rank Adaptation) models in ComfyUI. This extension is particularly useful for AI artists who work with LoRA models, as it automates the retrieval and application of trigger words, enhancing the efficiency and effectiveness of their workflows.
Key Features:
Automatic Trigger Word Retrieval: Fetches trigger words from Civitai API and model training metadata.
Compatibility with Stacked LoRAs: Works seamlessly with stacked LoRAs, allowing for more complex and layered model applications.
User-Friendly Interface: Provides both vanilla and advanced nodes, catering to different levels of user expertise and needs.
By using this extension, AI artists can save time and effort, ensuring they always have the correct trigger words for their LoRA models, leading to more accurate and desired outputs.
How ComfyUI-Lora-Auto-Trigger-Words Works
The extension operates by integrating with ComfyUI and utilizing custom nodes to fetch and display trigger words associated with LoRA models. Here’s a simplified breakdown of how it works:
Fetching Trigger Words: The extension retrieves trigger words from two primary sources:
Civitai API: For models available on Civitai, the extension fetches the relevant trigger words directly from the API.
Model Training Metadata: If available, the extension extracts trigger words embedded in the model’s training metadata.
Displaying Trigger Words: The fetched trigger words are then displayed within ComfyUI, allowing users to easily view and apply them in their workflows.
Customization and Control: Users can customize the behavior of the nodes, such as forcing data fetches, enabling previews, and appending LoRA names to tag lists.
This process ensures that AI artists have quick and easy access to the necessary trigger words, streamlining their creative process.
ComfyUI-Lora-Auto-Trigger-Words Features
Lora Trigger Words
Sources: Trigger words are imported from the Civitai API and model training metadata.
Vanilla vs Advanced Nodes: Vanilla nodes provide basic functionality, while advanced nodes offer additional features like previews and tag lists.
Nodes
LoraLoader (Vanilla and Advanced)
Input:
override_lora_name (optional): Overrides the lora_name field with a specified name.
Fields:
force_fetch: Forces data fetching from Civitai.
enable_preview: Toggles the preview of the LoRA model.
append_lora_if_empty: Adds the LoRA name to the tag list if it’s empty.
Output:
civitai_tags_list: List of tags from Civitai.
meta_tags_list: List of tags from model metadata.
lora_name: Name of the selected LoRA.
LoraLoaderStacked (Vanilla and Advanced)
Input:
lora_stack (optional): Another stack of LoRA.
override_lora_name (optional): Overrides the lora_name field with a specified name.
Fields:
force_fetch: Forces data fetching from Civitai.
enable_preview: Toggles the preview of the LoRA model.
append_lora_if_empty: Adds the LoRA name to the tag list if it’s empty.
Output:
civitai_tags_list: List of tags from Civitai.
meta_tags_list: List of tags from model metadata.
lora_name: Name of the selected LoRA.
LoraTagsOnly
Input:
override_lora_name (optional): Overrides the lora_name field with a specified name.
Output:
civitai_tags_list: List of tags from Civitai.
meta_tags_list: List of tags from model metadata.
lora_name: Name of the selected LoRA.
TagsFormater
Function: Displays available tags and their indexes, sorted by training frequency.
TagsSelector
Function: Filters tags and applies weights to them.
Parameters:
selector: Defines the filtering criteria.
weight: Sets the weight for the tag.
ensure_comma: Ensures proper comma placement.
LoraListNames
Function: Lists all existing LoRA names for use in override_lora_name.
Filtering
Format: Uses Python list indexing to select specific tags or ranges of tags.
Examples: 0, 3, 5:8, -8:
View Info
Function: Displays detailed information about the selected LoRA or Checkpoint.
Examples
Normal Workflow: Demonstrates a typical use case of the extension.
Stacked Workflow: Shows how to use stacked LoRAs for more complex applications.
Chaining Selectors and Stacked: Illustrates chaining tag selectors and stacked LoRAs for advanced workflows.
Troubleshooting ComfyUI-Lora-Auto-Trigger-Words
Common Issues and Solutions
Trigger Words Not Fetching:
Ensure you have an active internet connection.
Check if the Civitai API is accessible.
Use the force_fetch option to refresh data.
Preview Not Displaying:
Make sure the enable_preview option is turned on.
Verify that the model has a preview available.
Tags Not Appearing:
Confirm that the model has embedded metadata.
Use the append_lora_if_empty option to add the LoRA name to the tag list.
Frequently Asked Questions
Q: Can I use this extension with any LoRA model?
A: Yes, it works with any LoRA model, including those with embedded metadata and those available on Civitai.
Q: How do I update the extension?
A: Follow the update instructions provided in the original repository or documentation.
Learn More about ComfyUI-Lora-Auto-Trigger-Words
For additional resources, tutorials, and community support, consider exploring the following:
Community Forums: Join community forums and Discord channels to ask questions and share your experiences.
By leveraging these resources, you can enhance your understanding and usage of the ComfyUI-Lora-Auto-Trigger-Words extension, making your AI art creation process more efficient and enjoyable.