Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > Rebalance-Pack > Image Resolution Cap

ComfyUI Node: Image Resolution Cap

Class Name

ImageResolutionCap

Category
Rebalance-Pack/image
Author
nova452 (Account age: 1390days)
Extension
Rebalance-Pack
Latest Updated
2026-07-30
Github Stars
0.47K

How to Install Rebalance-Pack

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

Manage and adjust image resolution by capping longest or shortest side to specified limit, preserving aspect ratio and optimizing for performance and compatibility.

Image Resolution Cap:

The ImageResolutionCap node is designed to manage and adjust the resolution of images by capping either the longest or shortest side to a specified limit. This functionality is particularly useful for ensuring that images do not exceed a certain size, which can be crucial for maintaining performance and compatibility in various applications. By allowing you to specify whether to cap the longest or shortest side, the node provides flexibility in how images are resized, ensuring that the aspect ratio is preserved while meeting the desired resolution constraints. This node is beneficial for artists and developers who need to optimize images for different platforms or devices, as it helps maintain a balance between image quality and resource usage.

Image Resolution Cap Input Parameters:

image

The image parameter is the input image that you want to process. It is essential for the node's operation, as it provides the data that will be resized according to the specified resolution cap. If no image is provided, the node will return the input as is without any processing.

resolution_cap

The resolution_cap parameter specifies the maximum allowable size for the image's longest or shortest side, depending on the cap_longest_side setting. This integer value determines the scale to which the image will be resized, ensuring it does not exceed the specified limit. There is no explicit minimum or maximum value provided, but it should be set according to the desired output size.

downscale_method

The downscale_method parameter defines the algorithm used to resize the image. Options typically include methods like nearest, bilinear, bicubic, and lanczos, each offering different trade-offs between speed and quality. The choice of method can impact the visual quality of the resized image, with some methods preserving more detail than others.

cap_longest_side

The cap_longest_side parameter is a boolean that determines whether the resolution cap should be applied to the longest side of the image. If set to True, the longest side will be capped; if False, the shortest side will be capped. This setting allows you to control how the image is resized, depending on whether you want to prioritize width or height.

Image Resolution Cap Output Parameters:

out

The out parameter is the processed image that has been resized according to the specified resolution cap and downscale method. This output maintains the aspect ratio of the original image while ensuring that the specified side does not exceed the resolution cap. The resized image is returned in the same format as the input, ready for further processing or use.

Image Resolution Cap Usage Tips:

  • To maintain the best image quality, choose a downscale method that suits your needs; bicubic and lanczos are generally good choices for preserving detail.
  • Use the cap_longest_side parameter to control whether you want to prioritize width or height when resizing images, depending on your specific requirements.

Image Resolution Cap Common Errors and Solutions:

Image is None

  • Explanation: This error occurs when no image is provided to the node, resulting in no processing being done.
  • Solution: Ensure that a valid image is passed to the node as input before attempting to process it.

Invalid Downscale Method

  • Explanation: This error arises when an unsupported downscale method is specified, leading to potential issues in resizing.
  • Solution: Verify that the downscale_method parameter is set to a supported method such as nearest, bilinear, bicubic, or lanczos.

Image Resolution Cap Related Nodes

Go back to the extension to check out more related nodes.
Rebalance-Pack
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 Resolution Cap