ComfyUI  >  Nodes  >  ComfyUI's ControlNet Auxiliary Preprocessors >  Pixel Perfect Resolution

ComfyUI Node: Pixel Perfect Resolution

Class Name

PixelPerfectResolution

Category
ControlNet Preprocessors
Author
Fannovel16 (Account age: 3127 days)
Extension
ComfyUI's ControlNet Auxiliary Preproces...
Latest Updated
6/18/2024
Github Stars
1.6K

How to Install ComfyUI's ControlNet Auxiliary Preprocessors

Install this extension via the ComfyUI Manager by searching for  ComfyUI's ControlNet Auxiliary Preprocessors
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI's ControlNet Auxiliary Preprocessors 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 Cloud 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

Pixel Perfect Resolution Description

Calculate optimal image dimensions for precise resizing without quality loss, ideal for AI artists.

Pixel Perfect Resolution:

The PixelPerfectResolution node is designed to help you achieve the perfect resolution for your images by calculating the optimal dimensions based on the target height and width, as well as the resize mode. This node ensures that your images are resized accurately without losing quality, making it ideal for tasks that require precise image dimensions. By leveraging advanced algorithms, it computes the best possible resolution, maintaining the integrity and clarity of your images. This is particularly useful for AI artists who need to upscale or downscale images while preserving the original details and avoiding distortions.

Pixel Perfect Resolution Input Parameters:

image

This parameter takes an image in the form of a NumPy array. The image serves as the base from which the node will calculate the optimal resolution. The quality and dimensions of this input image directly impact the final output, so it is essential to provide a high-quality image for the best results.

target_H

This parameter specifies the target height for the image. It is an integer value that determines the desired height of the output image. The node uses this value to calculate the optimal resolution, ensuring that the image is resized accurately. There is no explicit minimum or maximum value, but it should be a positive integer that makes sense for your specific use case.

target_W

This parameter specifies the target width for the image. Similar to target_H, it is an integer value that determines the desired width of the output image. The node uses this value in conjunction with the target height to compute the best possible resolution. Ensure that this value is a positive integer appropriate for your needs.

resize_mode

This parameter defines the mode of resizing to be used. It can take values from the ResizeMode enumeration, such as ResizeMode.OUTER_FIT or ResizeMode.INNER_FIT. The chosen mode affects how the image is scaled and cropped, impacting the final resolution. Selecting the appropriate resize mode is crucial for achieving the desired output.

Pixel Perfect Resolution Output Parameters:

estimation

This output parameter provides the estimated optimal resolution as an integer. It represents the computed value that ensures the image is resized accurately according to the specified target height, target width, and resize mode. This value is crucial for maintaining the quality and integrity of the image during the resizing process.

Pixel Perfect Resolution Usage Tips:

  • Ensure that the input image is of high quality to achieve the best results when resizing.
  • Choose the appropriate resize_mode based on whether you want the image to fit within the target dimensions (INNER_FIT) or to cover the entire area (OUTER_FIT).
  • Use realistic target height and width values that align with your project's requirements to avoid unnecessary distortions.

Pixel Perfect Resolution Common Errors and Solutions:

Invalid image format

  • Explanation: The input image is not in the correct format (NumPy array).
  • Solution: Ensure that the image is provided as a NumPy array before passing it to the node.

Negative or zero target dimensions

  • Explanation: The target height or width is set to a negative value or zero.
  • Solution: Set the target height and width to positive integer values that make sense for your specific use case.

Unsupported resize mode

  • Explanation: The resize_mode provided is not recognized.
  • Solution: Use a valid resize_mode from the ResizeMode enumeration, such as ResizeMode.OUTER_FIT or ResizeMode.INNER_FIT.

Pixel Perfect Resolution Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI's ControlNet Auxiliary Preprocessors
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.