🧹 Clear LoRA Name:
The ClearLoraName node is designed to streamline and clean up text prompts by removing specific tags associated with LoRA (Low-Rank Adaptation) models. These tags, formatted as <lora:...>, are often used in AI art generation to specify certain model parameters or configurations. However, they can clutter the prompt text and may not always be necessary for the final output. This node efficiently strips these tags from both positive and negative prompts, ensuring that the text is clean and free from unnecessary elements. By doing so, it helps maintain the clarity and focus of the prompts, which can be particularly beneficial when generating art using AI models. The node also optimizes the text by reducing multiple spaces to a single space and cleaning up spaces before punctuation, resulting in a more polished and professional prompt.
🧹 Clear LoRA Name Input Parameters:
enabled
This parameter is a boolean that determines whether the LoRA tag stripping functionality is active. When set to True, the node will remove any <lora:...> tags from the input prompts. If set to False, the node will act as a pass-through, leaving the prompts unchanged. The default value is True, allowing for immediate tag removal unless specified otherwise.
positive_prompt
This is a string input that represents the positive prompt text from which LoRA tags will be removed. It is optional and can be multiline, providing flexibility in the amount of text you can input. If any <lora:...> tags are present, they will be stripped out, leaving a cleaner prompt. The default value is an empty string, meaning no prompt is provided unless specified.
negative_prompt
Similar to the positive prompt, this string input represents the negative prompt text. It is also optional and can be multiline. The node will remove any <lora:...> tags found within this text, ensuring that the negative prompt is free from unnecessary tags. The default value is an empty string, indicating no prompt is provided unless specified.
🧹 Clear LoRA Name Output Parameters:
positive_prompt
This output provides the cleaned version of the positive prompt, with all <lora:...> tags removed. The result is a streamlined text that is ready for use in AI art generation, free from any extraneous tags that might have been present in the input.
negative_prompt
This output delivers the cleaned version of the negative prompt, similarly stripped of any <lora:...> tags. The output ensures that the negative prompt is concise and focused, enhancing its effectiveness in guiding AI models during the art generation process.
🧹 Clear LoRA Name Usage Tips:
- Ensure the
enabledparameter is set toTrueif you want to remove LoRA tags from your prompts. This is the default setting, but it's good to double-check if you notice tags are not being removed. - Use the node to clean up both positive and negative prompts before feeding them into your AI model. This can help improve the clarity and effectiveness of the prompts.
🧹 Clear LoRA Name Common Errors and Solutions:
Invalid input type
- Explanation: This error occurs if the input provided is not a string or is empty when the node expects a string input.
- Solution: Ensure that both
positive_promptandnegative_promptare provided as strings. If no prompt is needed, use an empty string instead of other data types.
Node not enabled
- Explanation: If the node is not removing tags, it might be because the
enabledparameter is set toFalse. - Solution: Check the
enabledparameter and set it toTrueto activate the tag removal functionality.
