ComfyUI Node

Resize Image

Same resize engine as Load & Resize, minus the file loading

By loz2754·Created 8 months ago·Updated about 22 hours ago· 5
Resize Image
  • image
  • mask
  • IMAGE
  • MASK
  • width
  • height
resizefalse
use_framepack_bucketfalse
base_resolution640
width512
height512
methodkeep proportion
crop_positioncenter
interpolationlanczos

AUNImageResize is the load-free half of AUNImageLoadResize. Same resize engine, same strategies, same FramePack bucket support - but instead of loading a file, it takes an IMAGE tensor that's already in your graph and hands back a resized one. You reach for it when your image comes from another node - a VAE decode, an upscaler, a batch processor, a canvas editor - and you need to get it into the dimensions your sampler wants before encoding it.

The input is image (an IMAGE tensor - note the type difference from Load & Resize Image, which takes a file selector). The controls mirror its sibling exactly: the resize boolean gates everything, then method (stretch / keep proportion / fill-crop / pad), crop_position (center/left/right/top/bottom for the crop path), interpolation (six filters, lanczos default), and width/height as the target box. use_framepack_bucket plus base_resolution snaps to the nearest FramePack aspect-ratio bucket scaled to your base - the same trick that makes video-frame prep painless, and genuinely useful for img2img too since it lands your image on a resolution the model family already likes.

The useful addition is the optional mask input: a MASK tensor resized alongside the image, same method and interpolation. That means you can keep an alpha mask perfectly in lockstep with its image - the classic pairing for inpainting or compositing workflows where a misaligned mask silently ruins the output. Resizing them together is one of those "you don't think you need this until you do" features.

Outputs are IMAGE and MASK (resized), plus width and height as INTs so downstream nodes and filename builders know the true resulting dimensions. There's no filename output here - that's the loader's job; this node is pure geometry.

Practical pattern: decode a latent → this node re-sizes to the batch's target → VAE encode → img2img pass. Or upscale → resize back down to working resolution → detail pass. Because it reuses the exact helper the load version uses, behavior is identical - you can swap one for the other without changing your expectations.

Install with the pack: ComfyUI Manager (search "AUN") or cd ComfyUI/custom_nodes && git clone https://github.com/loz2754/AUN-ComfyUI-Nodes, then restart. It leans on opencv-python-headless from the pack's requirements (if you cloned manually and hit ModuleNotFoundError: cv2, pip install -r custom_nodes/AUN-ComfyUI-Nodes/requirements.txt). No models, nothing heavy. If you never load images from disk, this is the AUN resize node you actually want.

CategoryAUN Nodes/Image

Inputs (10)

NameTypeDefaultDescription
imageIMAGEImage tensor to resize.
resizeBOOLEANfalseEnable automatic resizing to specified dimensions. Maintains aspect ratio.
use_framepack_bucketBOOLEANfalseIf enabled (with resize), choose nearest FramePack bucket based on aspect ratio and base resolution.
base_resolutionINT640320–2048Base resolution for bucket scaling. 640 matches original; higher scales proportionally.
widthINT5120–2048Target width for resizing (8-pixel increments). Only used if resize is enabled.
heightINT5120–2048Target height for resizing (8-pixel increments). Only used if resize is enabled.
methodCOMBOkeep proportionResize strategy: stretch to exact size, keep aspect ratio, fill then crop, or pad to fit.
crop_positionCOMBOcenterWhen using fill / crop, choose which edge or center anchors the crop window.
interpolationCOMBOlanczosInterpolation filter used during resizing.
maskoptMASKOptional mask tensor resized alongside the image.

Outputs (4)

NameTypeDescription
IMAGEIMAGE
MASKMASK
widthINT
heightINT