ComfyUI > Nodes > ComfyUI-RMBG > Image Resize (RMBG) 🖼️🎭

ComfyUI Node: Image Resize (RMBG) 🖼️🎭

Class Name

AILab_ImageResize

Category
🧪AILab/🖼️IMAGE
Author
1038lab (Account age: 1116days)
Extension
ComfyUI-RMBG
Latest Updated
2026-02-03
Github Stars
1.89K

How to Install ComfyUI-RMBG

Install this extension via the ComfyUI Manager by searching for ComfyUI-RMBG
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-RMBG 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 Resize (RMBG) 🖼️🎭 Description

AILab_ImageResize adjusts image dimensions with precision, maintaining quality and aspect ratio.

Image Resize (RMBG) 🖼️🎭:

AILab_ImageResize is a powerful node designed to adjust the dimensions of images with precision and flexibility, catering to the needs of AI artists who require specific image sizes for their creative projects. This node allows you to resize images using various methods, ensuring that the final output maintains the desired quality and aspect ratio. By offering multiple resizing modes and resampling techniques, AILab_ImageResize provides you with the ability to tailor the resizing process to suit different artistic requirements, whether it's for maintaining the original aspect ratio, fitting within a specific dimension, or scaling by a particular factor. The node's versatility makes it an essential tool for preparing images for further processing or final presentation, ensuring that your artwork is displayed exactly as intended.

Image Resize (RMBG) 🖼️🎭 Input Parameters:

image

The image parameter is the input image that you wish to resize. It serves as the primary subject for the resizing operation, and its dimensions will be adjusted based on the other parameters specified.

size

The size parameter determines the target dimension for the resizing operation. Depending on the resize_mode, this value can represent either the width, height, or the longest/shortest side of the image. It allows you to control the final size of the image, ensuring it fits within the desired constraints.

resize_mode

The resize_mode parameter specifies the method used to resize the image. Options include "longest_side," "shortest_side," "width," and "height." Each mode dictates how the size parameter is applied, allowing you to maintain the aspect ratio or fit the image within specific dimensions.

scale_by

The scale_by parameter is a multiplier that scales the image dimensions by a specified factor. This allows for proportional resizing, where the image is enlarged or reduced while maintaining its original aspect ratio. The default value is 1.0, meaning no scaling is applied.

resampling

The resampling parameter defines the algorithm used for resizing the image. Options include "nearest-exact," "bilinear," "area," "bicubic," and "lanczos." Each method offers a different balance between speed and quality, with "lanczos" typically providing the highest quality for photographic images.

megapixels

The megapixels parameter sets a target for the total number of pixels in the resized image. This is useful for ensuring that the image does not exceed a certain size, which can be important for performance or storage considerations. The aspect ratio is preserved while adjusting the image to meet the megapixel constraint.

Image Resize (RMBG) 🖼️🎭 Output Parameters:

resized_image

The resized_image parameter is the output image that has been adjusted according to the specified input parameters. It reflects the new dimensions and quality based on the chosen resizing method and resampling technique, ready for further use or display.

width

The width parameter indicates the final width of the resized image. It provides a numerical value that represents the horizontal dimension of the output image, allowing you to verify that the resizing operation has achieved the desired result.

height

The height parameter indicates the final height of the resized image. Similar to the width, it provides a numerical value representing the vertical dimension of the output image, ensuring that the resizing operation aligns with your specifications.

Image Resize (RMBG) 🖼️🎭 Usage Tips:

  • To maintain the original aspect ratio while resizing, use the "longest_side" or "shortest_side" resize_mode, depending on whether you want to fit the image within a specific dimension or expand it to fill a space.
  • For high-quality image resizing, especially for photographic content, consider using the "lanczos" resampling method, as it provides superior results compared to other methods.
  • When working with large images or limited resources, use the megapixels parameter to constrain the output size, ensuring that the image remains manageable without sacrificing too much detail.

Image Resize (RMBG) 🖼️🎭 Common Errors and Solutions:

Image is None

  • Explanation: This error occurs when the input image is not properly loaded or is missing.
  • Solution: Ensure that the image path or URL is correct and that the image file is accessible. Verify that the image format is supported by the node.

Error loading image

  • Explanation: This error indicates a failure in processing the image, possibly due to an unsupported format or corrupted file.
  • Solution: Check the integrity of the image file and ensure it is in a compatible format. If the issue persists, try converting the image to a standard format like JPEG or PNG before resizing.

Image Resize (RMBG) 🖼️🎭 Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-RMBG
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 Resize (RMBG) 🖼️🎭