TK Anima 格式化:
The AnimaTKAnimaFormatter node is designed to standardize and format tag strings into the specific prompt format required by the Anima model. This node is essential for ensuring that the tags used in AI art generation adhere to the Anima model's guidelines, which include a specific order of tag sections, the use of spaces instead of underscores, and the addition of an @ prefix for artist names. By organizing tags into predefined sections such as quality, character, series, and artist, and converting them into a space-separated format, this node helps maintain consistency and improve the quality of the generated art. Additionally, it includes features like deduplication and length control to optimize the prompt for better adherence and quality, making it a valuable tool for AI artists looking to leverage the Anima model effectively.
TK Anima 格式化 Input Parameters:
escape_bracket
This parameter determines whether brackets in the tags should be escaped. Escaping brackets is crucial because unescaped brackets can be misinterpreted by systems like ComfyUI as syntax for attention weights, which can lead to unintended results. The default value is True, meaning brackets will be escaped by default. This ensures that the tags are interpreted correctly and consistently.
at_artist
This parameter specifies whether an @ symbol should be prefixed to artist names in the tags. The Anima model requires this prefix to properly recognize artist tags, and failing to include it can significantly weaken the effect of the artist tag. The default value is True, ensuring that artist names are formatted correctly for optimal impact.
reorder_sections
This parameter controls whether the tags should be reordered according to the Anima model's specified section order. Reordering ensures that tags are organized into the correct sequence, which is [quality/meta/year/safety] [1girl/1boy/1other] [character] [series] [artist] [general tags]. The default value is True, which helps maintain consistency with the Anima model's expectations.
dedupe
This parameter determines whether duplicate tags should be removed from the input. Removing duplicates can help streamline the prompt and prevent redundancy, which can improve the clarity and effectiveness of the tags. The default value is True, promoting a cleaner and more efficient tag set.
max_tags
This parameter allows you to set a limit on the number of tags included in the prompt. Limiting the number of tags can prevent the prompt from becoming too long, which can negatively impact the quality and adherence of the generated art. The default setting is "不限制" (no limit), but setting a limit can be beneficial for optimizing performance.
max_lines
This parameter sets a limit on the number of lines in the prompt. Similar to max_tags, controlling the number of lines can help maintain the prompt within an optimal length range, which is approximately 2–3 sections or 15 lines. This helps ensure that the prompt remains effective and aligned with the Anima model's training conditions.
TK Anima 格式化 Output Parameters:
formatted_tags
The output parameter formatted_tags provides the standardized and formatted tag string that adheres to the Anima model's requirements. This output is crucial for ensuring that the tags are correctly interpreted by the model, leading to higher quality and more consistent AI-generated art. The formatted tags are organized into the specified section order, with spaces instead of underscores, and include any necessary prefixes or escapes.
TK Anima 格式化 Usage Tips:
- Always ensure that the
at_artistparameter is set toTrueto maximize the impact of artist tags in your prompts. - Use the
reorder_sectionsparameter to maintain the correct tag order, which is essential for achieving the best results with the Anima model. - Consider setting limits on
max_tagsandmax_linesto prevent overly long prompts, which can degrade the quality of the generated art.
TK Anima 格式化 Common Errors and Solutions:
Missing @ in artist tag
- Explanation: The artist tag is missing the required
@prefix, which can weaken its effect. - Solution: Ensure that the
at_artistparameter is set toTrueto automatically add the@prefix to artist tags.
Unescaped brackets in tags
- Explanation: Brackets in the tags are not escaped, leading to potential misinterpretation by systems like ComfyUI.
- Solution: Set the
escape_bracketparameter toTrueto ensure all brackets are properly escaped.
Incorrect tag order
- Explanation: Tags are not in the correct order as specified by the Anima model, which can affect the quality of the output.
- Solution: Use the
reorder_sectionsparameter to automatically arrange tags into the correct sequence.
