ComfyUI > Nodes > antrobots ComfyUI Nodepack > Scale Image with Reference

ComfyUI Node: Scale Image with Reference

Class Name

scale_with_reference

Category
antrobots-ComfyUI-nodepack/image-handling
Author
antrobot (Account age: 3193days)
Extension
antrobots ComfyUI Nodepack
Latest Updated
2025-04-02
Github Stars
0.02K

How to Install antrobots ComfyUI Nodepack

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

Scale Image with Reference Description

Resize input image to match reference image size using interpolation for alignment and consistency, with method flexibility.

Scale Image with Reference:

The scale_with_reference node is designed to adjust the size of an input image to match the dimensions of a reference image. This node is particularly useful when you need to ensure that two images are of the same size for further processing or analysis. By utilizing interpolation techniques, it maintains the quality of the image while resizing, making it an essential tool for tasks that require image alignment or consistency in dimensions. The node offers flexibility in choosing the interpolation method, allowing you to balance between speed and quality based on your specific needs.

Scale Image with Reference Input Parameters:

image_in

The image_in parameter represents the input image that you want to scale. This image will be resized to match the dimensions of the reference image. It is crucial to provide a valid image tensor here, as this is the primary image that will undergo transformation.

image_ref

The image_ref parameter is the reference image whose dimensions will be used as the target size for scaling the input image. This image acts as a template, ensuring that the output image matches its size. Providing a reference image with the desired dimensions is essential for achieving the correct output size.

scale_mode

The scale_mode parameter determines the interpolation method used during the scaling process. Options include various interpolation techniques, with "bilinear" being the default. This parameter affects the quality and speed of the scaling operation, allowing you to choose a method that best suits your requirements. The choice of interpolation can impact the smoothness and clarity of the scaled image.

Scale Image with Reference Output Parameters:

image_out

The image_out parameter is the resulting image after the input image has been scaled to match the reference image's dimensions. This output image retains the content of the input image but is resized to the specified size, making it suitable for applications that require uniform image dimensions.

Scale Image with Reference Usage Tips:

  • Ensure that the reference image (image_ref) has the desired dimensions before using it, as the output image will match its size.
  • Experiment with different scale_mode options to find the best balance between processing speed and image quality for your specific use case.

Scale Image with Reference Common Errors and Solutions:

Invalid image tensor

  • Explanation: This error occurs when the input or reference image is not a valid tensor or is improperly formatted.
  • Solution: Verify that both image_in and image_ref are correctly formatted image tensors before passing them to the node.

Unsupported interpolation mode

  • Explanation: This error arises when an invalid or unsupported interpolation mode is specified in the scale_mode parameter.
  • Solution: Ensure that the scale_mode is set to a supported interpolation method, such as "bilinear", and check for any typos or incorrect values.

Scale Image with Reference Related Nodes

Go back to the extension to check out more related nodes.
antrobots ComfyUI Nodepack
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 Playground, enabling artists to harness the latest AI tools to create incredible art.