Resize Image
Force an exact width and height
- image
- IMAGE
The blunt one. You give it an exact width and an exact height, and it makes the image exactly that. No aspect-ratio preservation, no cleverness - if you ask for 512×512 from a 16:9 image, you get a squished 512×512. That's a feature, not a bug, as long as you know that's what you're asking for.
Most of the resize nodes in this pack keep proportions and do some math for you. This one deliberately doesn't. It's for the cases where you know the exact target dimensions and you want them, full stop - matching a model's native training size, hitting a fixed canvas, or lining up two images to the same grid before you composite or batch them.
How it works
It's a straight interpolated resize to your target width × height. Because it's interpolation, enlarging won't add detail - it just scales the pixels you already have. If you're trying to make a small image genuinely bigger and sharper, that's a model-upscaler job, not this. This is geometry, not enhancement.
The inputs that matter
- width and height (both default 512) - your exact output size. Whatever you type is what you get, aspect ratio be damned.
- method -
LANCZOS,BICUBIC, orNEAREST.LANCZOSis the sharpest and the default you want for photographic content.BICUBICis a bit smoother.NEARESTdoes no blending at all, which is exactly right for masks and pixel art and exactly wrong for everything else.
The image input is your source; the output is a single IMAGE.
When to reach for it vs the others
If you care about not distorting the picture, don't use this - use ResizeLongestToNode (fit inside a box) or ResizeImageResolution (hit a target size, keep proportions). Reach for this exact-dimensions node when you specifically need a fixed W×H and you've already handled aspect ratio yourself, or when a little distortion genuinely doesn't matter for the downstream step (a low-res control hint, say). Knowing which resize node is which is half the value of the pack; they look identical on the canvas and behave very differently.
Installing ComfyUI-LogicUtils
Through ComfyUI Manager: Install Custom Nodes → search "ComfyUI-LogicUtils" → install → restart. Manual clone:
cd ComfyUI/custom_nodes
git clone https://github.com/aria1th/ComfyUI-LogicUtils
Restart ComfyUI afterward. This node has no extra dependencies - it's pure Python image handling, so there's nothing to download and nothing to configure.
Worth knowing
LogicUtils is aria1th's (AngelBottomless, of Illustrious XL fame) personal utility collection, and the README openly admits there are too many nodes to document properly. For something this simple that's no loss - the node is one input triple with obvious behavior. Just keep the distinction straight in your head: this is the stretch to exact size node, and if your output looks squished, it did exactly what you told it to.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| width | INT | 512 | — |
| height | INT | 512 | — |
| method | COMBO | 3 options: NEAREST, LANCZOS, BICUBIC |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |