ComfyUI > Nodes > ComfyUI-LogicUtils > Resize Image With Resolution If Smaller

ComfyUI Node: Resize Image With Resolution If Smaller

Class Name

ResizeImageResolutionIfSmaller

Category
image
Author
aria1th (Account age: 3016days)
Extension
ComfyUI-LogicUtils
Latest Updated
2026-01-21
Github Stars
0.1K

How to Install ComfyUI-LogicUtils

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

Resize Image With Resolution If Smaller Description

Adjusts image resolution if below target, ensuring minimum size with quality-preserving resampling.

Resize Image With Resolution If Smaller:

The ResizeImageResolutionIfSmaller node is designed to adjust the resolution of an image only if its current resolution is smaller than a specified target. This node is particularly useful when you want to ensure that images meet a minimum resolution requirement without unnecessarily enlarging images that already meet or exceed this threshold. By focusing on images that are smaller than the desired resolution, this node helps maintain a consistent quality across your image dataset, ensuring that all images are at least as large as the specified resolution. The node uses advanced resampling methods to resize images, preserving as much detail and quality as possible during the process.

Resize Image With Resolution If Smaller Input Parameters:

image

This parameter represents the input image that you want to resize. It is crucial as it serves as the base for the resizing operation. The image should be in a format that the node can process, typically a standard image file format like JPEG or PNG.

resolution

The resolution parameter specifies the target resolution threshold. If the total number of pixels in the input image is less than the square of this resolution, the image will be resized. The default value is 512, meaning the node will resize images with fewer than 262,144 pixels (512x512). This parameter ensures that images meet a minimum resolution standard, enhancing their suitability for various applications.

method

This parameter determines the resampling method used during the resizing process. You can choose from "NEAREST", "LANCZOS", or "BICUBIC". Each method offers different trade-offs between speed and quality. "NEAREST" is the fastest but may produce lower quality results, "LANCZOS" provides high-quality results suitable for detailed images, and "BICUBIC" offers a balance between speed and quality. Selecting the appropriate method can significantly impact the visual quality of the resized image.

Resize Image With Resolution If Smaller Output Parameters:

IMAGE

The output is the resized image, returned as a single image object. If the input image's resolution is already equal to or greater than the specified threshold, the original image is returned unchanged. This ensures that the output maintains the highest possible quality, only altering images that require resizing to meet the specified resolution criteria.

Resize Image With Resolution If Smaller Usage Tips:

  • Use the resolution parameter to set a minimum quality standard for your image dataset, ensuring all images are suitable for high-resolution displays or printing.
  • Choose the method parameter based on your quality requirements and processing time constraints. For high-quality results, especially with detailed images, consider using "LANCZOS".

Resize Image With Resolution If Smaller Common Errors and Solutions:

Image has no pixels

  • Explanation: This error occurs when the input image is empty or corrupted, resulting in zero pixels.
  • Solution: Verify that the input image is valid and not corrupted. Ensure the image file is correctly loaded and accessible.

Resolution must be positive and at least 256

  • Explanation: This error indicates that the specified resolution is below the minimum required threshold.
  • Solution: Adjust the resolution parameter to a value of at least 256 to ensure proper functionality of the node.

Resize Image With Resolution If Smaller Related Nodes

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