TK 触发词:
The TK Trigger Words node is designed to manage and generate trigger words for use in AI art workflows, particularly in conjunction with LoRA (Low-Rank Adaptation) models. This node extracts trigger words from LoRA syntax inputs, which can be either directly connected from a LoRA node or manually entered. The primary function of this node is to streamline the process of managing trigger words by prioritizing those specified in the bridge's lora_list over default file names, ensuring that the most relevant and effective trigger words are used in text encoding processes. By separating this functionality into its own node, it avoids overcomplicating the LoRA nodes and provides a dedicated space for trigger word management, enhancing the efficiency and organization of your AI art projects.
TK 触发词 Input Parameters:
lora_syntax
This parameter accepts a string input that represents the LoRA syntax, which can be connected from a LoRA node's output or manually entered in the format <lora:name:weight>. It serves as the primary source for extracting trigger words, which are crucial for guiding the AI model's behavior. The default value is an empty string, and it supports multiline input to accommodate multiple LoRA entries.
trigger_words
This optional parameter allows you to manually add additional trigger words that will be appended to the list generated from the LoRA syntax. It accepts a string input, which can be separated by commas or spaces, and is useful for supplementing the automatically extracted trigger words with custom ones that may be specific to your project needs. The default value is an empty string, and it supports multiline input.
tw_map
This parameter is a string input that holds a JSON representation of trigger words, maintained on the front end for persistence. It is used to save and restore trigger word configurations across sessions, ensuring that your workflow remains consistent even after refreshing or reloading. The default value is an empty string, and it supports multiline input.
TK 触发词 Output Parameters:
trigger_words
The output parameter trigger_words is a string that contains a comma-separated list of unique trigger words. These words are derived from the LoRA syntax input, manually added trigger words, and any additional mappings provided. This output is essential for feeding into text encoding nodes like CLIPTextEncode, where it influences the AI model's understanding and generation of art based on the specified triggers.
TK 触发词 Usage Tips:
- Ensure that your
lora_syntaxinput is correctly formatted and includes all necessary LoRA entries to maximize the effectiveness of the trigger words generated. - Use the
trigger_wordsparameter to add any specific or project-related trigger words that might not be covered by the LoRA syntax, enhancing the customization of your AI art outputs. - Regularly update and maintain your
tw_mapto ensure that your trigger word configurations are preserved across different sessions and projects.
TK 触发词 Common Errors and Solutions:
Invalid LoRA Syntax
- Explanation: The
lora_syntaxinput may not be correctly formatted, leading to errors in parsing the trigger words. - Solution: Double-check the syntax format and ensure it follows the
<lora:name:weight>structure, with each entry separated by spaces.
Duplicate Trigger Words
- Explanation: Manually added trigger words might duplicate those extracted from the LoRA syntax, causing redundancy.
- Solution: Review the list of trigger words and remove any duplicates to maintain a clean and efficient set of triggers.
Missing Trigger Words in Output
- Explanation: Some trigger words might not appear in the output if they are not correctly mapped or included in the inputs.
- Solution: Verify that all desired trigger words are either present in the
lora_syntaxor added manually, and ensure thetw_mapis up-to-date.
