Tag Category Strength (Raffle):
The TagCategoryStrength node is designed to adjust the strength of tags based on their categories, providing a flexible way to manage and fine-tune tag weights in your AI art projects. This node allows you to apply specific adjustments to categories of tags, ensuring that certain aspects of your artwork are emphasized or de-emphasized according to your creative vision. By normalizing tag names and applying category-specific adjustments, the node helps maintain consistency and control over the influence of different tags. This is particularly useful when you want to preserve existing tag weights or apply new strengths to enhance the desired artistic effects. The node's ability to parse and validate category adjustments ensures that only valid categories are used, preventing errors and maintaining the integrity of your tag adjustments.
Tag Category Strength (Raffle) Input Parameters:
input_tags
input_tags is a string containing the tags you wish to adjust. These tags can be in a simple format or include existing weights, such as tag or (tag:1.2). The node will normalize these tags by replacing newlines with commas and removing unnecessary spaces or commas, ensuring a consistent format for processing.
category_adjustments
category_adjustments is a string that specifies the adjustments to be applied to each category. The format should be (category:strength), where category is the name of the category and strength is a numerical value representing the adjustment factor. This parameter allows you to define how much influence each category should have, with the node validating the categories against a predefined set to ensure correctness.
preserve_existing_weights
preserve_existing_weights is a boolean parameter that determines whether existing weights on tags should be preserved. If set to True, the node will retain the original weights of tags that already have them, applying adjustments only to tags without existing weights. This option is useful when you want to maintain the current influence of certain tags while adjusting others.
Tag Category Strength (Raffle) Output Parameters:
adjusted_tags
adjusted_tags is a list of tags with their adjusted weights. Each tag is processed according to the specified category adjustments, resulting in a set of tags that reflect the desired emphasis or de-emphasis of certain categories. This output allows you to see the direct impact of your adjustments on the tag weights, providing a clear view of how your input has been transformed.
debug_info
debug_info is a list of strings providing detailed information about the adjustments made to each tag. This includes whether a tag's weight was kept or adjusted, and the final weight applied. This output is valuable for understanding the internal workings of the node and verifying that the adjustments align with your expectations.
Tag Category Strength (Raffle) Usage Tips:
- Ensure that your
category_adjustmentsstring is correctly formatted and includes only valid categories to avoid errors. - Use the
preserve_existing_weightsoption to maintain the influence of tags that already have specific weights, allowing you to selectively adjust only certain tags. - Regularly check the
debug_infooutput to verify that the adjustments are being applied as intended and to troubleshoot any unexpected results.
Tag Category Strength (Raffle) Common Errors and Solutions:
Invalid format '<part>'. Expected format: (category:strength), e.g., (artist:1.4)
- Explanation: This error occurs when the
category_adjustmentsstring contains a part that does not match the expected format. - Solution: Ensure that each part of the
category_adjustmentsstring is formatted as(category:strength)and separated by commas.
Invalid category '<category>'. Valid categories are: <valid_categories_str>
- Explanation: This error indicates that a specified category in the
category_adjustmentsstring is not recognized as a valid category. - Solution: Check the list of valid categories and ensure that all specified categories in your adjustments are included in this list.
Invalid strength value '<strength>' for category '<category>'. Must be a number.
- Explanation: This error occurs when the strength value provided for a category is not a valid number.
- Solution: Verify that all strength values in the
category_adjustmentsstring are numerical and correctly formatted.
