ComfyUI  >  Nodes  >  ComfyUI Image Saver >  Width/Height Literal (Image Saver)

ComfyUI Node: Width/Height Literal (Image Saver)

Class Name

Width_Height Literal (Image Saver)

Category
ImageSaver/utils
Author
alexopus (Account age: 2709 days)
Extension
ComfyUI Image Saver
Latest Updated
7/20/2024
Github Stars
0.0K

How to Install ComfyUI Image Saver

Install this extension via the ComfyUI Manager by searching for  ComfyUI Image Saver
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI Image Saver 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
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Width/Height Literal (Image Saver) Description

Node for specifying image dimensions with precision, aiding AI artists in setting resolution for various outputs.

Width_Height Literal (Image Saver):

The Width_Height Literal (Image Saver) node is designed to provide a straightforward way to specify the dimensions of an image in terms of width and height. This node is particularly useful for AI artists who need to define the resolution of their generated images with precision. By using this node, you can easily set the desired width and height values, ensuring that your images are created at the exact resolution you need. This can be especially beneficial when working with different models or when preparing images for specific outputs, such as prints or digital displays. The node simplifies the process of setting image dimensions, making it accessible even for those without a deep technical background.

Width_Height Literal (Image Saver) Input Parameters:

int

This parameter allows you to specify the integer value for either the width or height of the image. The function of this parameter is to define the resolution of the image in pixels. The minimum value you can set is 1, ensuring that the image has at least one pixel in width or height. The maximum value is determined by the constant MAX_RESOLUTION, which ensures that the image does not exceed the maximum allowable resolution. The default value is set to 512 pixels, which is a common resolution for many image generation tasks. Adjusting this parameter will directly impact the size and quality of the generated image.

Width_Height Literal (Image Saver) Output Parameters:

INT

The output parameter of this node is an integer value that represents the specified width or height of the image. This value is crucial as it determines the resolution of the generated image. By setting this parameter, you ensure that the image is created with the exact dimensions you need, which can be important for various applications, such as ensuring compatibility with different display devices or meeting specific project requirements.

Width_Height Literal (Image Saver) Usage Tips:

  • When setting the width and height, consider the aspect ratio of your image to avoid distortion. For example, if you want a square image, set both width and height to the same value.
  • Use the default value of 512 pixels for quick tests and adjustments, then fine-tune the dimensions as needed for your final output.
  • Ensure that the width and height values are within the capabilities of your hardware and software to avoid performance issues.

Width_Height Literal (Image Saver) Common Errors and Solutions:

ValueError: Width or height exceeds maximum resolution

  • Explanation: This error occurs when the specified width or height exceeds the MAX_RESOLUTION limit.
  • Solution: Check the maximum allowable resolution and ensure that your width and height values are within this limit.

ValueError: Width or height must be greater than zero

  • Explanation: This error occurs when the specified width or height is set to a value less than 1. - Solution: Ensure that both the width and height values are set to at least 1 pixel.

TypeError: Invalid type for width or height

  • Explanation: This error occurs when a non-integer value is provided for the width or height.
  • Solution: Make sure to input integer values for both the width and height parameters.

Width/Height Literal (Image Saver) Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI Image Saver
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.