Set Wildcard Text:
The SageSetWildcardText node is designed to enhance your text processing capabilities by allowing you to dynamically load and apply user-defined wildcards from a specified directory. This node is particularly useful for generating varied and creative text outputs by replacing placeholders in your text with random or predefined values. By leveraging a seed value, it ensures consistent results across multiple executions, making it ideal for scenarios where reproducibility is important. Additionally, it offers options to clean the text and append prefixes or suffixes, providing flexibility in how the final text is structured. This node is a powerful tool for AI artists looking to introduce variability and creativity into their text-based projects.
Set Wildcard Text Input Parameters:
str_input
This parameter accepts the main text input where wildcards will be applied. It supports multiline text and dynamic prompts, allowing for complex and varied text structures. The input text can include placeholders that will be replaced by the wildcard values.
seed
The seed parameter is an integer that influences the randomness of the wildcard replacement process. By setting a specific seed value, you can ensure that the same wildcards are applied consistently across different runs. The seed value ranges from 0 to 2<sup>32-1, with a default of 0.
clean
This boolean parameter determines whether the resulting text should be cleaned after wildcard replacement. When set to true, the text will be processed to remove any unwanted characters or formatting, ensuring a polished output. The default value is false.
prefix
The prefix parameter allows you to add a specific string at the beginning of the processed text. This can be useful for adding context or specific formatting to the output. It supports multiline input and is optional, meaning you can choose to leave it empty if not needed.
suffix
Similar to the prefix, the suffix parameter lets you append a string to the end of the processed text. This is useful for closing statements or adding additional context. It also supports multiline input and is optional.
Set Wildcard Text Output Parameters:
str_output
The str_output parameter provides the final processed text after all wildcards have been replaced and any specified cleaning, prefixing, or suffixing has been applied. This output is ready for use in your projects, offering a dynamically generated and potentially unique text based on the input parameters.
Set Wildcard Text Usage Tips:
- Use a consistent seed value if you need reproducible results across different runs.
- Experiment with different wildcard sets to explore creative text variations.
- Utilize the prefix and suffix options to add context or specific formatting to your output text.
Set Wildcard Text Common Errors and Solutions:
Wildcard file not found
- Explanation: This error occurs when the specified wildcard file is missing from the directory.
- Solution: Ensure that the wildcard file is correctly named and located in the designated wildcards directory.
Invalid seed value
- Explanation: The seed value provided is outside the acceptable range.
- Solution: Verify that the seed value is an integer between 0 and 2
<sup>32-1.
Text cleaning failed
- Explanation: An error occurred during the text cleaning process.
- Solution: Check the input text for unusual characters or formatting that might interfere with the cleaning function.
