EZ Text to Size:
The EZ_Text_to_Size node is designed to extract numerical dimensions from a given text string, specifically targeting the last two numbers found within the input. This functionality is particularly useful for AI artists and designers who need to dynamically determine image dimensions or other size-related parameters from textual descriptions. By automating the extraction of width and height values from a string, this node simplifies the process of setting up dimensions for various creative projects, ensuring that the correct size parameters are easily and accurately obtained without manual parsing. This node is part of the EZ NODES category, which aims to provide straightforward and efficient solutions for common tasks in text processing.
EZ Text to Size Input Parameters:
text_input
The text_input parameter is a string that serves as the source from which the node will extract numerical values. This parameter is crucial as it contains the text that potentially includes the dimensions you wish to extract. The function of this parameter is to provide the node with the necessary data to parse and identify the last two numbers, which will be interpreted as width and height. The default value for this parameter is "1024x1024", which suggests a common use case of extracting dimensions from a resolution-like format. There are no explicit minimum or maximum values for this parameter, but it should contain at least two numbers to function correctly.
EZ Text to Size Output Parameters:
WIDTH
The WIDTH output parameter represents the first of the last two numbers extracted from the text_input. This value is interpreted as the width dimension, which can be used in various applications such as setting the width of an image or a canvas. The importance of this parameter lies in its ability to dynamically adapt to the input text, providing flexibility in design and automation processes.
HEIGHT
The HEIGHT output parameter is the second of the last two numbers extracted from the text_input. This value is interpreted as the height dimension, complementing the WIDTH parameter to provide a complete set of dimensions. Like the WIDTH, this parameter is crucial for applications that require precise size specifications, allowing for automated adjustments based on the input text.
EZ Text to Size Usage Tips:
- Ensure that your
text_inputcontains at least two numbers to successfully extract width and height values. If your input text is a resolution or size description, it should naturally include these numbers. - Use this node to automate the extraction of dimensions from descriptive text, which can be particularly useful in workflows that involve dynamic content generation or resizing tasks.
EZ Text to Size Common Errors and Solutions:
EZ Text to Size: No input provided.
- Explanation: This error occurs when the
text_inputparameter is eitherNoneor an empty string, meaning there is no data for the node to process. - Solution: Provide a valid string containing at least two numbers to ensure the node can extract the necessary dimensions.
EZ Text to Size: Need at least 2 numbers, found <number> in '<text_input>'.
- Explanation: This error indicates that the
text_inputdoes not contain at least two numbers, which are required to determine width and height. - Solution: Modify the
text_inputto include at least two numerical values. Ensure that the input text is formatted correctly to include the necessary dimensions.
EZ Text to Size: Error processing input '<text_input>': <error_message>.
- Explanation: This is a generic error message indicating that an unexpected issue occurred while processing the
text_input. - Solution: Check the format and content of your
text_inputfor any anomalies or unsupported characters. Ensure that the input is a valid string and try again. If the problem persists, review the error message for specific details and adjust the input accordingly.
