Nodes/ComfyUI_DD_Nodes/DD Image Resize
ComfyUI Node

DD Image Resize

Force any image to any exact pixel size

By digital-divas-admin·Created 7 months ago·Updated 5 months ago· 0
DD Image Resize
  • image
  • image
width512
height512
methodbilinear

You know that moment in ComfyUI when a node downstream demands 1024x1024 and the image in front of you is 896x1152? "Resize this, exactly" is one of the most common requests in a graph, and it's surprisingly awkward in core ComfyUI. DD Image Resize is the blunt, no-frills answer: an image in, a width and a height, and the same image out at exactly those dimensions. No aspect-ratio magic, no math, no surprises.

How it works

Under the hood it's a thin wrapper around PyTorch's interpolate. The incoming image tensor (which lives in ComfyUI's B, H, W, C layout) gets transposed to B, C, H, W, resized to your target (height, width), and flipped back. What you actually control from the graph is which interpolation method it uses:

  • bilinear - the default, and a fine general-purpose choice for both up and down.
  • bicubic - marginally sharper on the way up; can look slightly overshooty on edges.
  • nearest - chunky pixelated scaling, zero smoothing. The right call for pixel art or when you want to preserve hard edges.
  • area - averages pixel neighborhoods. This is the one you want for downscaling: bilinear/bicubic shrink aggressively without antialiasing and will alias like crazy. Area keeps the result looking intentional.

The inputs and output

Only four inputs, and only three of them matter:

  • image - any IMAGE tensor.
  • width (default 512, range 1–8192) and height (default 512, range 1–8192) - the exact target in pixels.
  • method - one of the four above, defaulting to bilinear.

The single output is image, the resized tensor. Wire it into whatever needs the fixed size: a VAE encode, a ControlNet preprocessor that expects a specific resolution, or straight into a batch node.

Where you'll actually reach for it

The classic job is normalizing inputs - ComfyUI happily batches differently-sized images in many places, but latents don't. If you're loading reference images and feeding them through an IPAdapter or a detailer, forcing them all to one size first saves you a world of "shape mismatch" errors. It's also the natural partner for DD Get Image Size + DD Integer Math when you want "match this image's size" or "half this image's size" instead of a hardcoded number.

The honest caveat: core ComfyUI already has ImageScale, which does nearly the same job. This node's advantage is that it's smaller and dumber - no scale-by vs scale-to confusion, no hidden options. If you like the DD family's minimalism, it's the one I'd grab. Just remember it will stretch the image if your target aspect ratio differs from the source; for aspect-preserving work, compute the dimensions first or use a scale-by node.

Installing it

The pack is ComfyUI_DD_Nodes by Digital Divas. Easy path: ComfyUI Manager → search "DD Nodes". Manual path:

cd ComfyUI/custom_nodes
git clone https://github.com/digital-divas-admin/ComfyUI_DD_Nodes.git

Restart ComfyUI. That's the whole install - the pack's requirements.txt is empty, so there are zero extra Python dependencies, no model downloads, nothing to configure. One footgun: a different, unrelated repo also calls itself "ComfyUI-DD-Nodes", so when Manager returns results, make sure the repo is digital-divas-admin/ComfyUI_DD_Nodes before you hit install.

CategoryDD Nodes/Image

Inputs (4)

NameTypeDefaultDescription
imageIMAGE
widthINT5121–8192
heightINT5121–8192
methodCOMBObilinear4 options: nearest, bilinear, bicubic, area

Outputs (1)

NameTypeDescription
imageIMAGE