Visit ComfyUI Online for ready-to-use ComfyUI environment
Manage and adjust LoRA tag weights with precision and flexibility using different modes of operation.
The NormalizeLoraTags node is designed to manage and adjust <lora:name:weight> tags within a given string, ensuring that these tags are properly normalized, compressed, or limited according to specified parameters. This node is particularly useful for AI artists who work with LoRA (Low-Rank Adaptation) models and need to maintain consistent and balanced tag weights in their prompts. The node parses tags with float weights, leaving those with non-float weights unchanged, and completely ignores tags with zero weight. It offers different modes of operation, such as NORMALIZE, LIMITER, SOFT_COMPRESS, and HARD_COMPRESS, each providing a unique method of handling the tag weights. The node also allows you to specify which tags to process based on their weight being positive, negative, or both. The output weights are rounded to three decimal places, ensuring precision and consistency in the results.
The string parameter is the input text containing the <lora:name:weight> tags that you want to process. This parameter is crucial as it provides the raw data that the node will parse and adjust according to the specified mode and bounds. The string should be formatted correctly with tags that include a name and a weight, where the weight is a float value. There are no specific minimum or maximum values for this parameter, but it should be a valid string containing the tags you wish to normalize.
The bounds parameter determines which tags will be affected by the normalization process. It can take one of three values: POSITIVE, NEGATIVE, or BOTH. This parameter is important because it allows you to selectively process tags based on their weight. For example, choosing POSITIVE will only affect tags with positive weights, while NEGATIVE will target those with negative weights. BOTH will process all tags regardless of their weight sign. This flexibility helps in fine-tuning the tag normalization process to meet specific artistic needs.
The mode parameter specifies the method of processing the tags. It can be set to NORMALIZE, LIMITER, SOFT_COMPRESS, or HARD_COMPRESS. Each mode offers a different approach to handling the tag weights. NORMALIZE ensures that the total magnitude of the selected tags equals the target weight, while LIMITER only normalizes when the total magnitude exceeds the target weight. SOFT_COMPRESS and HARD_COMPRESS provide varying levels of compression, with SOFT_COMPRESS being a gentle reduction and HARD_COMPRESS offering a stronger compression. This parameter is essential for controlling how aggressively the tag weights are adjusted.
The normalized_string is the output parameter that contains the processed string with the <lora:name:weight> tags adjusted according to the specified mode and bounds. This output is crucial as it provides the final result of the normalization process, with weights rounded to three decimal places for precision. The normalized_string allows you to use the adjusted tags in your AI art projects, ensuring that the tag weights are balanced and consistent with your artistic goals.
bounds parameter based on whether you want to affect positive, negative, or all tags.mode settings to find the best balance for your project. For subtle adjustments, SOFT_COMPRESS might be ideal, while HARD_COMPRESS is better for more significant weight reductions.<lora:name:weight> format, with weight being a float value.RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.