Nodes/KJNodes for ComfyUI/Resize Image (deprecated)
ComfyUI Node Runs on cloud

Resize Image (deprecated)

The KJNodes resize node (and why you shouldn't use this one anymore)

By kijai·Created 3 years ago·Updated a day ago· 3,011
Resize Image (deprecated)
  • image
  • get_image_size
  • IMAGE
  • width
  • height
width512
height512
upscale_method
keep_proportionfalse
divisible_by2
crop

Straight up: this node is deprecated. If you landed here from a Google search, the node's own description tells you to go use the v2 version instead. ImageResizeKJ still exists only so that old workflows built around it don't detonate the moment you open them. Kijai kept it as a fossil, not as a tool you should be reaching for in 2026. So the honest advice is: if you're building something new, drop in the newer resize node from the same pack and move on.

That said, it's worth understanding what this node does, because the v2 does the same job and people search for the old name constantly.

What it's for

It resizes an image. That sounds trivial, and core ComfyUI already has an upscale node, but the KJNodes resize became a workflow staple for one reason: divisible_by. Most diffusion models get cranky if your width and height aren't clean multiples of 8 (some architectures want 16 or 64). Feed them an odd size and you get errors or subtly mangled output. This node forces the final dimensions to snap to a multiple you choose, so you never have to do the mental math. That's the feature that made it stick.

The inputs that matter

  • width / height - your target size. With keep_proportion off, the image gets squashed to exactly these numbers. With it on, they act as a bounding box and aspect ratio is preserved.
  • divisible_by - the whole point. Default is 2; bump it to 8 or 64 depending on what your model wants. The output gets rounded to the nearest valid multiple.
  • upscale_method - the interpolation. You get nearest-exact, bilinear, area, bicubic, and lanczos. For upscaling, lanczos is the sharp one; for downscaling, area avoids aliasing. nearest-exact is for pixel art and masks where you don't want blending.

There are two optional inputs. get_image_size takes another IMAGE and copies its dimensions - handy when you need this image to match the size of something else in the graph without hardcoding numbers. crop (disabled or center) decides what happens to the aspect ratio when it doesn't fit: center-crop instead of stretch.

Outputs are the resized IMAGE plus the final width and height as integers, so you can wire the actual dimensions downstream to a latent or a save node.

How to install KJNodes

Same as any pack. In ComfyUI Manager, open the Custom Nodes Manager, search "KJNodes for ComfyUI", install, and restart. By hand it's cd ComfyUI/custom_nodes && git clone https://github.com/kijai/ComfyUI-KJNodes, then install the requirements with pip install -r ComfyUI-KJNodes/requirements.txt (portable users run python_embeded\python.exe -m pip install -r ComfyUI\custom_nodes\ComfyUI-KJNodes\requirements.txt), then restart. Kijai keeps the pack's dependencies deliberately minimal, so there's no model to download for this - it's pure image math.

Troubleshooting

The main "problem" is the deprecation itself. This node broke because of ComfyUI frontend changes, which is exactly why the rewrite exists. If your old workflow shows this node with a strikethrough or a warning, that's expected - swap it for the v2 node, rewire the same connections, and you're done. Don't try to "fix" the old one; it's kept alive on purpose but it isn't being maintained.

If the node doesn't appear at all after install, you probably skipped the requirements.txt step or didn't do a full restart. Check the ComfyUI Manager for import errors. And worth knowing: kijai has actually kept KJNodes current through ComfyUI's Nodes 2.0 frontend rewrite, so you're not walking into the compatibility mess that hit some other utility packs - this specific node is the exception, deprecated for its own reasons, not casualty of the frontend churn.

CategoryKJNodes/image

Inputs (8)

NameTypeDefaultDescription
imageIMAGE
widthINT5120–16384
heightINT5120–16384
upscale_methodCOMBO5 options: nearest-exact, bilinear, area, bicubic, lanczos
keep_proportionBOOLEANfalse
divisible_byINT20–512
get_image_sizeoptIMAGE
cropoptCOMBO0 will do the default center crop, this is a workaround for the widget order changing with the new frontend, as in old workflows the value of this widget becomes 0 automatically

Outputs (3)

NameTypeDescription
IMAGEIMAGE
widthINT
heightINT