Nodes/ComfyUI-Light-Tool/Light-Tool: Resize Image
ComfyUI Node

Light-Tool: Resize Image

Exact resize with real control over the interpolation

By ihmily·Created 2 years ago·Updated 4 months ago· 20
Light-Tool: Resize Image
  • image
  • image
width512
height512
resize_methodLANCZOS
modeRGB

Resizing is the most common operation in ComfyUI that somehow still takes four clicks to get right. Light-Tool: ResizeImage does the honest version: you give it target width and height, it gives you back an image exactly that size, with your choice of interpolation method and output mode. No smart-crop guesswork, no hidden aspect-ratio logic - just resize.

Inputs: image (required), width and height (INT, default 512, up to 8192), resize_method (dropdown: LANCZOS default, BICUBIC, NEAREST, BILINEAR), and mode (dropdown: RGB default, RGBA, L). Output: one image.

How it works. Each frame is converted to the selected mode and resized to the exact target dimensions using the chosen resampling filter. LANCZOS is the default for good reason - it's the sharpest of the four and the standard choice for quality downscales and moderate upscales. BICUBIC and BILINEAR are softer and faster; NEAREST gives crisp pixels with zero smoothing, which is exactly what you want for pixel art or for upscaling hard-edged graphics without halos. The mode control determines the output format: RGB flattens any alpha, RGBA preserves it, and L returns a single-channel grayscale image.

The thing the description gets wrong. The node's own description string says "crop an image based on its width and height," and it is not that. It does not crop anything. It resizes, hard, to the exact width and height you give it. Which brings up the real gotcha:

No aspect-ratio lock. Give it 1024×1024 for a 4:3 image and you get a squashed 1024×1024. If you want proportional scaling, this node isn't the one - the pack ships ResizeImageV2, ResizeImageByRatio, ResizeImageByMaxSize, and ResizeImageByMinSize for that, or you compute the ratio yourself. Knowing the pack has those siblings is half the value of knowing this node: reach for this one when you want a specific dimension, reach for the others when you want the shape preserved.

When you'd reach for it. Prepping inputs at a fixed resolution for a model or a crop, normalizing mixed-size batches before a batch node (though remember most batch nodes still want identical sizes across frames), or converting to grayscale/alpha-preserving output via mode. It's also the natural companion to this pack's ImageConcat and ImageOverlay, both of which demand matching dimensions.

Installing. With the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/ihmily/ComfyUI-Light-Tool.git
pip install -r requirements.txt
# restart ComfyUI

Or ComfyUI Manager → search ComfyUI-Light-Tool → Install. No models; resampling is pure Pillow.

Simple, predictable, and honest about what it does - once you remember the aspect-ratio caveat and the pack's proportional siblings, it's the resize node you'll actually enjoy using.

CategoryComfyUI-Light-Tool/image/Resize

Inputs (5)

NameTypeDefaultDescription
imageIMAGE
widthINT5120–8192
heightINT5120–8192
resize_methodCOMBOLANCZOS4 options: LANCZOS, BICUBIC, NEAREST, BILINEAR
modeCOMBORGB3 options: RGB, RGBA, L

Outputs (1)

NameTypeDescription
imageIMAGE