ComfyUI > Nodes > ComfyUI-EZ-AF-Nodes > EZ Text to Size

ComfyUI Node: EZ Text to Size

Class Name

EZ_Text_to_Size

Category
EZ NODES
Author
ez-af (Account age: 599days)
Extension
ComfyUI-EZ-AF-Nodes
Latest Updated
2025-09-23
Github Stars
0.03K

How to Install ComfyUI-EZ-AF-Nodes

Install this extension via the ComfyUI Manager by searching for ComfyUI-EZ-AF-Nodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-EZ-AF-Nodes in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

EZ Text to Size Description

Extracts the last two numbers from text to determine image dimensions for creative projects.

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_input contains 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_input parameter is either None or 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_input does not contain at least two numbers, which are required to determine width and height.
  • Solution: Modify the text_input to 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_input for 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.

EZ Text to Size Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-EZ-AF-Nodes
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

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.