Resize Image
The pack's full resize engine, on any image or mask
- input
- resized
- width
- height
The Nifty Nodes loaders come with a built-in resize pipeline - this node is that same pipeline, extracted and pointed at any image or mask that's already in your graph. It's the resize node you reach for when you want the pack's scaler without loading a file: match a mask to an image, normalize a reference image to model-native resolution, or just get a clean resize with the width and height handed to you as numbers.
What it is
- input - an IMAGE or MASK (the node accepts both and preserves the type through).
- resize - the resize mode dropdown (see below).
- Outputs: resized (same type as input), width, and height - the dimensions after scaling, as INTs you can wire into latent or sampler math.
The resize menu
The dropdown is the heart of it. Modes include:
- scale dimensions - exact width × height (with optional center crop so you don't stretch).
- scale by multiplier - scale both axes by a float.
- scale longer / shorter dimension - scale one side to a target, preserving aspect ratio.
- scale width / scale height - target a single side, keep the ratio.
- scale total pixels - target a megapixel count.
- make divisible by - snap to a multiple (set 16 for WAN video, 64 for most latent workflows).
On top of the mode, you get separate scale-method pickers for upscaling and downscaling. The defaults are the community-standard picks: lanczos for upscaling (smooth, good detail), area for downscaling (sharp, minimal aliasing). If you want the fast-and-hard look, nearest-exact; the (antialias) variants for smooth downscales; mitchell-netravali for sharp upscales with less ringing. The nvidia-rtx-vsr option exists but needs an NVIDIA RTX GPU plus the separate nvidia-vfx package - it's a hardware AI scaler, not a torch resize, so skip it unless you have the rig and the package.
Why you'd reach for it
Two workflow shapes dominate. First, mask-to-image alignment: resize a mask up to match a generated image before compositing. Second, feed the loader pipeline without a file: take an image you already have (from a sampler, a detailer, a batch) and snap it to the exact dimensions a model expects, reading width/height off the node for downstream math. Because it handles masks and images with the same interface, it's the one resize node to remember in this pack.
Installing it
Part of the Nifty Nodes pack:
cd ComfyUI/custom_nodes
git clone https://github.com/Stibo/comfyui-nifty-nodes
or search "Nifty Nodes" in ComfyUI Manager, then restart. No model downloads. The nvidia-rtx-vsr method is the only one with an extra requirement.
Gotchas
Remember it's aspect-ratio-aware by default: modes like "scale longer dimension" preserve the ratio, so the output width/height may not be what you naively expected - read them off the node's outputs. If you need a hard crop to exact dimensions, use "scale dimensions" with the crop option. And as with the whole pack, it targets ComfyUI's newer V3 API - update ComfyUI if the node doesn't show up after install.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| input | COMFY_MATCHTYPE_V3 | Image or mask to resize. | |
| resize | COMBO | Resize mode. Scaling methods: 'nearest-exact' = fastest, hard edges; 'bilinear' / 'bicubic' = general purpose; 'area' = best for downscaling; 'lanczos' = best for upscaling photos; 'mitchell-netravali' = sharp upscaling with minimal ringing; 'bilinear (antialias)' / 'bicubic (antialias)' = smooth downscaling. 'nvidia-rtx-vsr' requires an NVIDIA RTX GPU and nvidia-vfx package. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| resized | COMFY_MATCHTYPE_V3 | — |
| width | INT | — |
| height | INT | — |