Nodes/MTB Nodes/Image Resize Factor (mtb)
ComfyUI Node Runs on cloud

Image Resize Factor (mtb)

Resize by multiplier instead of typing exact pixels

By melMass·Created 3 years ago·Updated about a month ago· 721
Image Resize Factor (mtb)
  • image
  • mask
  • IMAGE
  • MASK
factor2.00
supersampletrue
resamplingnearest

Most of ComfyUI's core resize nodes want exact target dimensions - 1024 by 1536, type it in. This one flips that around: instead of a target size, you give it a factor and it scales your image (and optional mask) by that multiplier, preserving aspect ratio automatically. Want it twice as big? Factor 2. Want it at 60%? Factor 0.6. No mental math converting a percentage into pixels for whatever your source image happens to be.

The node's own description is upfront about its origin: "Extracted mostly from WAS Node Suite, with a few edits (most notably multiple image support) and less features." WAS Node Suite is one of the big general-purpose image-processing packs in the ComfyUI ecosystem, and melMass pulled this piece out and simplified it - trading some of WAS's extra options for a leaner node that also handles a batch of images at once rather than just one.

Inputs that matter

  • image - what you're resizing.
  • factor (default 2, range 0.01–16) - the multiplier. Values above 1 upscale, below 1 downscale.
  • resampling - the interpolation method: nearest, linear, bilinear, bicubic, trilinear, area, or nearest-exact. For most photographic upscaling, bicubic or bilinear give smoother results than nearest, which is the default and tends to look blocky at larger factors; nearest is really there for cases where you specifically want hard pixel edges (pixel art, masks) rather than smoothing.
  • supersample (default true) - toggles an extra render-then-downscale pass, the standard supersampling technique for cleaner edges and less aliasing. Costs a bit more compute; worth leaving on unless you're optimizing for speed over quality.
  • mask (optional) - if you're carrying a mask alongside the image, it gets resized by the same factor so the two stay aligned.

Outputs are IMAGE and MASK, both scaled and ready to feed onward.

Installing it

  • ComfyUI Manager - search "MTB Nodes", install, restart.
  • Manual - cd ComfyUI/custom_nodes && git clone https://github.com/melMass/comfy_mtb, restart. A manual clone needs pip install -r requirements.txt run inside the comfy_mtb folder first.

No model files needed - this is CPU/GPU tensor resizing, not a learned upscaler. If you want AI-detail upscaling rather than a straight resize, that's a different category of node entirely (an ESRGAN-style model upscaler), not this one.

Common issues & troubleshooting

Result looks blocky or pixelated at high factors. Check resampling - nearest is the default and it's the blockiest of the available options by design. Switch to bicubic or bilinear for smoother results at large scale factors.

Upscale is slower than expected. supersample adds real compute cost for its quality gain. If you're iterating quickly and don't need the extra sharpness yet, turn it off temporarily and re-enable for your final pass.

Mask ends up a different size than the image. Confirm both image and mask were actually wired in together - the mask only gets scaled if it's connected; leaving it unconnected just means no mask comes out, not an automatically-matched blank one.

Some mtb nodes fail to load at startup. Standard for a pack this size - check the console for [comfy_mtb] STATUS and http://127.0.0.1:8188/mtb for what didn't load. This node has no optional dependencies, so it's essentially never the one on that list.

Categorymtb/image

Inputs (5)

NameTypeDefaultDescription
imageIMAGE
factorFLOAT2.000.01–16
supersampleBOOLEANtrue
resamplingCOMBOnearest7 options: nearest, linear, bilinear, bicubic, trilinear, area, +1
maskoptMASK

Outputs (2)

NameTypeDescription
IMAGEIMAGE
MASKMASK