ComfyUI  >  Nodes  >  Various custom nodes by Eden.art >  WidthHeightPicker

ComfyUI Node: WidthHeightPicker

Class Name

WidthHeightPicker

Category
Eden 🌱
Author
aiXander (Account age: 302 days)
Extension
Various custom nodes by Eden.art
Latest Updated
7/23/2024
Github Stars
0.0K

How to Install Various custom nodes by Eden.art

Install this extension via the ComfyUI Manager by searching for  Various custom nodes by Eden.art
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Various custom nodes by Eden.art 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

WidthHeightPicker Description

Automate image resolution optimization with multiplier-based width and height adjustment for specific size requirements.

WidthHeightPicker:

The WidthHeightPicker node is designed to help you easily determine the optimal resolution for your images by adjusting the width and height based on a specified multiplier and rounding them to the nearest multiple of a given value. This node is particularly useful for ensuring that your images conform to specific size requirements, which can be crucial for various applications such as printing, web design, or digital art. By automating the calculation of the final dimensions, the WidthHeightPicker node saves you time and effort, allowing you to focus more on the creative aspects of your work.

WidthHeightPicker Input Parameters:

width

The width parameter specifies the initial width of the image in pixels. This value will be adjusted based on the output_multiplier and then rounded to the nearest multiple of multiple_off. The default value is 512 pixels.

height

The height parameter specifies the initial height of the image in pixels. Similar to the width parameter, this value will be adjusted based on the output_multiplier and then rounded to the nearest multiple of multiple_off. The default value is 512 pixels.

output_multiplier

The output_multiplier parameter is a floating-point value that scales the initial width and height. For example, a multiplier of 0.5 will reduce the dimensions by half. The default value is 0.5.

multiple_off

The multiple_off parameter specifies the value to which the final width and height will be rounded. This ensures that the dimensions are multiples of this value, which can be important for certain applications. The default value is 64, with a minimum of 1 and a maximum of 264.

WidthHeightPicker Output Parameters:

width

The width output parameter provides the final calculated width of the image after applying the output_multiplier and rounding to the nearest multiple of multiple_off. This value ensures that the image width is optimized for your specific needs.

height

The height output parameter provides the final calculated height of the image after applying the output_multiplier and rounding to the nearest multiple of multiple_off. This value ensures that the image height is optimized for your specific needs.

WidthHeightPicker Usage Tips:

  • To maintain the aspect ratio of your image while scaling, use the same output_multiplier for both width and height.
  • Adjust the multiple_off parameter to match the requirements of your target application, such as print sizes or screen resolutions.
  • Use the default values for quick and standard resizing, but feel free to experiment with different multipliers and multiples to achieve the desired effect.

WidthHeightPicker Common Errors and Solutions:

"Invalid width or height value"

  • Explanation: This error occurs if the provided width or height values are not integers or fall outside the acceptable range.
  • Solution: Ensure that the width and height values are integers and within the acceptable range specified by the node.

"Output multiplier must be a float"

  • Explanation: This error occurs if the output_multiplier is not a floating-point number.
  • Solution: Make sure to provide a valid floating-point number for the output_multiplier parameter.

"Multiple_off value out of range"

  • Explanation: This error occurs if the multiple_off value is outside the specified range of 1 to 264.
  • Solution: Adjust the multiple_off value to be within the range of 1 to 264.

WidthHeightPicker Related Nodes

Go back to the extension to check out more related nodes.
Various custom nodes by Eden.art
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.