ComfyUI Node

Image_Resize2

The old resize node — deprecated, use Image_Resize_sum instead

By cardenluo·Created 2 years ago·Updated 17 days ago· 309
Image_Resize2
  • image
  • get_image_size
  • IMAGE
  • width
  • height
◄model_scaleNoneâ–ș
◄pixel_methodbilinearâ–ș
◄width_max512â–ș
◄height_max512â–ș
◄keep_ratiofalseâ–ș
◄divisible_by8â–ș

Straight up: this node lives in the pack's own Deprecated category. The author still ships it - old workflows that reference it won't break on load - but it's not the node to reach for if you're starting fresh. ComfyUI-Apt_Preset has since built a newer, more capable resize family (Image_Resize_sum for scale/pad/crop with a restore path, Image_target_adjust for a straight fit-to-target, Image_UpscaleModel for model-plus-pixel scaling), and Image_Resize2 is what those replaced. This article exists because it still shows up in search and in old workflow JSON - here's what it does if you're stuck maintaining one.

What it does

It's a bounded resize: you give it a max width and max height, and it scales the image down (or up) to fit inside that box, using whichever pixel interpolation method you pick. There's an optional model_scale slot for running an upscale model first, though the schema only ever populated it with None in this environment - meaning no upscale models were registered when this brief was captured - so in practice most people ran this as a pure pixel resize.

The inputs and outputs that matter

  • width_max / height_max (INT, default 512 each) - the bounding box the image gets fit into.
  • keep_ratio (BOOLEAN, default off) - whether the resize preserves aspect ratio (fit inside the box) or stretches to fill it exactly.
  • pixel_method - the interpolation algorithm: nearest-exact, bilinear (default), area, bicubic, or lanczos. Bilinear is a safe general default; lanczos is sharper for photographic upscales.
  • divisible_by (INT, default 8) - rounds the final dimensions to a multiple of this number, which matters because most diffusion VAEs downsample by 8x (Flux wants a multiple of 64) - a size that isn't a clean multiple can shift or blur slightly after VAE encode/decode.
  • Optional get_image_size (IMAGE) - feed it a second image here and the node reads its dimensions to target, instead of width_max/height_max. Handy for matching one image's size to another's.

Three outputs: the resized IMAGE, plus width and height (INT) so you can wire the final dimensions downstream - into an EmptyLatentImage, for instance, without hardcoding numbers.

How to install it

Same install as every node in this pack. ComfyUI Manager: search ComfyUI-Apt_Preset, install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/cardenluo/ComfyUI-Apt_Preset
pip install -r requirements.txt

install.bat is the Windows convenience script; on Linux (comfy.icu's executor included) pip install -r requirements.txt is what actually runs the install.

Common issues

Because this node is deprecated, the biggest "issue" is really a decision: if you're building something new, skip straight to Image_Resize_sum or Image_target_adjust - they cover the same ground plus crop/pad modes and a proper restore path this node never had. If you inherited a workflow that already uses Image_Resize2, it should keep working as-is; the author hasn't pulled it, just filed it under the skull-and-crossbones category as a signal not to build on it further.

Beyond that, the usual pack-wide caveat applies: this is one node inside a large, actively developed pack whose requirements.txt covers a lot of unrelated ground (onnxruntime, gguf, transparent-background, scenedetect, and more for the pack's video/audio/segmentation nodes). There's a documented case on r/comfyui of a fresh ComfyUI-Apt_Preset install throwing IMPORT FAILED - if that happens, check the ComfyUI console for the actual missing-package error above the generic failure line, then re-run pip install -r requirements.txt.

CategoryApt_Preset/đŸš«Deprecated/đŸš«

Inputs (8)

NameTypeDefaultDescription
imageIMAGE—
model_scaleCOMBONone1 options: None
pixel_methodCOMBObilinear5 options: nearest-exact, bilinear, area, bicubic, lanczos
width_maxINT5120–99999—
height_maxINT5120–99999—
keep_ratioBOOLEANfalse—
divisible_byINT80–512—
get_image_sizeoptIMAGE—

Outputs (3)

NameTypeDescription
IMAGEIMAGE—
widthINT—
heightINT—