Image_Resize2
The old resize node â deprecated, use Image_Resize_sum instead
- image
- get_image_size
- IMAGE
- width
- height
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, orlanczos. 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 ofwidth_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.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | â | |
| model_scale | COMBO | None | 1 options: None |
| pixel_method | COMBO | bilinear | 5 options: nearest-exact, bilinear, area, bicubic, lanczos |
| width_max | INT | 5120â99999 | â |
| height_max | INT | 5120â99999 | â |
| keep_ratio | BOOLEAN | false | â |
| divisible_by | INT | 80â512 | â |
| get_image_sizeopt | IMAGE | â |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | â |
| width | INT | â |
| height | INT | â |