Nodes/Interior Design for Comfyui/Image Resize Normalizer
ComfyUI Node

Image Resize Normalizer

Resize the boring way — then snap it to 8

By RodrigoSKohl·Created 2 years ago·Updated about a year ago· 22
Image Resize Normalizer
  • images
  • IMAGE
target_size512
multiple8
mode

This is the boring node in the Interior Design for ComfyUI pack, and I mean that as a compliment. Image Resize Normalizer (class Image Normalize) does one unglamorous job: it takes your room photo, shrinks it so its longest side hits a target resolution, keeps the aspect ratio, and rounds the dimensions up to a clean multiple. That's it. No cleverness, no API, no weights to download. It exists because the rest of the pipeline - the segmenter, the ControlNets, the IP Adapter - all want a consistent canvas, and the diffusion backend wants dimensions that divide evenly into the latent grid.

Why you need a node this dumb

ComfyUI's own ImageScale can already resize an image. The difference is what happens after: this node guarantees the output height and width are both multiples of multiple (8 by default). Diffusion models encode and decode through a VAE that downsamples by 8x, so an image whose dimensions aren't divisible by 8 gets silently padded or cropped, which shifts your layout a few pixels and can throw off a mask you generated from the same image. When you're feeding the same photo into a segmentation map and an inpainting mask and a ControlNet, you want every branch working on an identical, VAE-friendly canvas. That consistency is the whole point of the node.

The workflow this ships in is the ComfyUI port of StableDesign, the 2nd-place entry in the AICrowd Generative Interior Design 2024 challenge. It's an SD 1.5-era pipeline, and SD 1.5 is happiest at 512px. The node's default target_size of 512 is that model family's sweet spot, not an arbitrary number.

The inputs and output that matter

  • images - your input IMAGE tensor. It resizes every image in a batch, not just the first.
  • target_size (512, range 2–4096) - the length the longest side gets scaled to. Lower is faster and more stable; higher keeps more detail at the cost of VRAM and speed.
  • multiple (8, range 2–128) - the grid the final dimensions snap to. 8 is right for SD 1.5/SDXL. Change it only if you know the VAE you're using wants something else.
  • mode (bilinear default; also nearest, bicubic, trilinear, area, nearest-exact) - the resampling filter. bilinear is the sensible default for a photo. nearest is worth knowing about if you ever route a mask or segmentation map through this node, because smooth filters blur hard edges you might want to keep.

The single output is an IMAGE, ready to plug into anything that expects a resized tensor - in this pack, that's the Interior Design Segmentator.

One honest limitation

The math is scale = target_size / max_dim if max_dim > target_size else 1.0. Translation: this node only downscales. Feed it a 640px photo with target_size: 512 and it shrinks; feed it a 256px photo and it leaves the size alone, only snapping up to the nearest multiple. If you need to blow a small image up, this isn't the node - pair it with an upscaler.

Install

It ships in the Interior Design for ComfyUI pack, so installing it means installing the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/RodrigoSKohl/InteriorDesign-for-ComfyUI

Then restart ComfyUI. Easier: open ComfyUI Manager, search "Interior Design for Comfyui", and hit install. The node itself pulls nothing extra - it's plain PyTorch F.interpolate - so you can grab it for free even if the rest of the pack's heavier dependencies scare you off.

Troubleshooting

  • Output isn't exactly your target size. Expected. The scale targets the longest side, and the multiple rounding rounds up, so a 1000px-wide image with multiple: 8 can land slightly above 512. That's the design, not a bug.
  • Blurry edges on masks. If you feed a mask or segmentation map through this node, switch mode to nearest so the filter doesn't feather the boundaries.
  • Image unchanged? Check whether the input was already smaller than target_size - remember, downscale-only.
Categoryimage

Inputs (4)

NameTypeDefaultDescription
imagesIMAGE
target_sizeINT5122–4096
multipleINT82–128
modeCOMBO6 options: bilinear, nearest, bicubic, trilinear, area, nearest-exact

Outputs (1)

NameTypeDescription
IMAGEIMAGE