Nodes/ComfyUI/Resize Image/Mask
ComfyUI Node Runs on cloud

Resize Image/Mask

The one resize node to rule them all (and keep mask and image in sync)

By Comfy-Org·Created 4 years ago·Updated 4 minutes ago· 129,952
Resize Image/Mask
  • input
  • resized
resize_type
scale_methodarea

If you only add one resize node to your toolkit, make it this one. It's the modern unified resizer in ComfyUI core - it takes an image or a mask, resizes it nine different ways, and hands back the same type. It's the designated successor to the old "Resize Images by Longer/Shorter Edge" nodes, which are now marked deprecated in the source specifically because this node exists.

It's also the newest member of the family - community mentions only start showing up in 2026 - so most tutorials still teach the old scattered nodes. Learn this one and you're ahead of them.

The big deal: image and mask in one node

Here's the pain it solves. Inpaint workflows need an image and its mask to be the same size, always. Resize them separately with different nodes - the classic trap - and they drift out of alignment by a few pixels, which quietly ruins your inpaint seams. This node takes input that can be either an IMAGE or a MASK (the schema literally accepts a match type), resizes it, and returns the same type. Feed it your mask, and the mask comes back resized identically to how you'd resize an image. Alignment is a property of the node instead of a thing you babysit.

The resize types that matter

resize_type is a dynamic dropdown - the field changes shape depending on what you pick. The useful ones:

  • scale to dimensions - width/height, and you can set one to 0 to auto-calculate the other while keeping aspect. A crop option appears: disabled (stretch to fit) or center (crop to keep aspect).
  • scale by factor - a plain multiplier. 2.0 doubles, 0.5 halves. The "hires-fix-lite" move.
  • scale longer dimension / shorter dimension - the exact behavior of the deprecated nodes, minus the deprecation.
  • scale to total pixels - target megapixels. 1.0 ≈ 1024×1024. Perfect for "just make it a reasonable size."
  • match size - resize to match another image or mask you wire in. Aligning a mask to its image in one step.
  • scale to multiple - makes both dimensions divisible by a number (default 8). This is the latent-alignment lifesaver: set 64, and your resize can never produce a canvas the VAE has to silently crop.

The interpolation setting

scale_method defaults to area, which is right for downscaling - the author's own tooltip says so. The full set: nearest-exact, bilinear, area, bicubic, lanczos. The two you'll actually choose between: area when shrinking (it averages pixels, no aliasing) and lanczos when growing (sharpest pure interpolation). If you're resizing pixel art, nearest-exact keeps the hard edges and the pixels.

What people actually hit

  • area on an upscale comes out soft and muddy. It's an anti-aliasing filter, not an enlarger. Switch to lanczos when going up.
  • Mask misalignment - even with a unified node, if you resize the image and the mask in separate instances of this node, they can still drift if you change settings in one and not the other. Use one match size call instead of two.
  • Forgetting the latent rule - resize to dimensions that aren't a multiple of 8/64 and the VAE encode crops your canvas. Use "scale to multiple" and never think about it again.
  • crop: center surprises - that option crops your image to force the aspect. If you pick it expecting letterboxing, you'll lose edges instead.

It ships with ComfyUI core; search "Resize Image/Mask" in the node menu or just type "resize" and it'll be the good one.

Categoryimage/transform

Inputs (3)

NameTypeDefaultDescription
inputCOMFY_MATCHTYPE_V3
resize_typeCOMBOSelect how to resize: by exact dimensions, scale factor, matching another image, etc.
scale_methodCOMBOareaInterpolation algorithm. 'area' is best for downscaling, 'lanczos' for upscaling, 'nearest-exact' for pixel art.

Outputs (1)

NameTypeDescription
resizedCOMFY_MATCHTYPE_V3