ComfyUI > Nodes > ComfyUI-UniversalToolkit > Image Scale Restore (UTK)

ComfyUI Node: Image Scale Restore (UTK)

Class Name

ImageScaleRestore_UTK

Category
UniversalToolkit/Image
Author
whmc76 (Account age: 1110days)
Extension
ComfyUI-UniversalToolkit
Latest Updated
2026-03-16
Github Stars
0.07K

How to Install ComfyUI-UniversalToolkit

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

Image Scale Restore (UTK) Description

Resizes images to target dimensions with quality preservation using various resampling methods.

Image Scale Restore (UTK):

The Image Scale Restore (UTK) node is designed to resize images to a specified target width and height while maintaining the quality and integrity of the original image. This node is particularly useful for artists and designers who need to adjust the size of images without compromising on detail or introducing unwanted artifacts. It offers a variety of resampling methods, such as LANCZOS, bicubic, hamming, bilinear, box, and nearest, allowing you to choose the most suitable technique for your specific needs. The node ensures that even if the target dimensions are smaller than a certain threshold, the image is resized to a minimum size to prevent errors. This functionality is essential for preparing images for various applications, ensuring they meet specific size requirements while preserving their visual quality.

Image Scale Restore (UTK) Input Parameters:

target_width

The target_width parameter specifies the desired width of the output image. It determines how wide the final image will be after the scaling process. This parameter is crucial for ensuring that the image fits within specific width constraints required for your project. The minimum value for this parameter is 4, ensuring that the image is not resized to an impractically small width.

target_height

The target_height parameter defines the desired height of the output image. Similar to target_width, it controls the vertical dimension of the image after scaling. This parameter is essential for maintaining the aspect ratio or fitting the image into a particular height requirement. The minimum value for this parameter is also 4, which prevents the image from being resized to an unusable height.

method

The method parameter allows you to select the resampling technique used during the resizing process. Options include LANCZOS, bicubic, hamming, bilinear, box, and nearest. Each method offers different advantages in terms of quality and processing speed. For instance, LANCZOS is known for high-quality results, while nearest is faster but may produce less smooth images. Choosing the right method can significantly impact the visual quality of the resized image.

Image Scale Restore (UTK) Output Parameters:

resized_images

The resized_images output parameter contains the batch of images that have been resized to the specified target dimensions. This output is crucial for verifying that the images have been correctly scaled and are ready for further use or analysis. The images are returned as tensors, which can be easily integrated into subsequent processing pipelines.

resized_masks

The resized_masks output parameter provides the resized masks corresponding to the input images, if applicable. This output is important for applications where masks are used to define regions of interest or to apply specific effects. Like the images, the masks are resized to match the target dimensions and are returned as tensors.

original_dimensions

The original_dimensions output parameter is a list containing the original width and height of the images before resizing. This information is useful for reference and for any processes that may require knowledge of the original image size.

target_dimensions

The target_dimensions output parameter includes the target width and height specified for the resizing process. This output confirms the dimensions to which the images have been resized, ensuring that they meet the intended specifications.

Image Scale Restore (UTK) Usage Tips:

  • Choose the method parameter based on the quality and speed requirements of your project. For high-quality results, consider using LANCZOS or bicubic.
  • Ensure that the target_width and target_height are set to values that maintain the aspect ratio of the original image to avoid distortion.
  • Use the original_dimensions output to keep track of the original size of your images, which can be useful for reverting changes or for documentation purposes.

Image Scale Restore (UTK) Common Errors and Solutions:

Image dimensions too small

  • Explanation: The target dimensions specified are smaller than the minimum allowed size of 4x4 pixels.
  • Solution: Ensure that both target_width and target_height are set to at least 4 to avoid this error.

Unsupported resampling method

  • Explanation: The method parameter is set to a value that is not recognized by the node.
  • Solution: Verify that the method parameter is set to one of the supported options: LANCZOS, bicubic, hamming, bilinear, box, or nearest.

Image Scale Restore (UTK) Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-UniversalToolkit
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.

Image Scale Restore (UTK)