Nodes/Quality of life Suit:V2/ImageScaleFactor _O
ComfyUI Node

ImageScaleFactor _O

Scale an image by a factor, not by pixels

By omar92·Created 3 years ago·Updated 5 months ago· 181
ImageScaleFactor _O
  • image
  • IMAGE
upscale_method
WidthFactor1.2500
HeightFactor1.2500
MulOf46enabled
crop

Most ComfyUI image-scaling nodes make you type a target resolution. That's awkward when what you actually want is "double this" or "shrink it to a quarter" - especially in a workflow where the input size changes run to run. ImageScaleFactor _O solves that by scaling an image with multiplication factors: separate WidthFactor and HeightFactor values, defaulting to 1.25 each. Wire in any IMAGE, and out comes a resized IMAGE.

It's in the Quality of Life Suit pack under O/image. Where does it fit? Think hires-fix and preprocessor chains. The community consensus is that a 1.5–2x upscale is the sweet spot for a second-pass img2img refinement, and factor-based math is the natural way to express that - you don't care that a 768×512 image becomes exactly 1152×768, you care that it doubled.

How it works

The node runs the image through comfy.utils.common_upscale, which is the same resize helper ComfyUI's own scaling nodes use - nothing exotic, just interpolation. The details that matter:

  • upscale_method - nearest-exact, bilinear, or area. For downscaling, area gives the cleanest result; for upscaling, bilinear is the usual default, and nearest-exact is there for pixel-art where you want hard edges.
  • MulOf46 - despite the cryptic name, this rounds the output dimensions to a multiple of 8, and it's enabled by default. Stable Diffusion models are trained on dimensions divisible by 8, and a latent whose size isn't a multiple of the VAE's downscale factor is a classic source of broken output. Leave it on. (The name is a leftover; the code enforces the rounding regardless.)
  • crop - disabled or center. If your factors produce a non-multiple, or you're scaling with cropping in mind, center crops from the middle.

Output dimensions are capped at 8192px either way. The single output is an IMAGE you can feed back into a sampler, a ControlNet preprocessor, or a VAE decode chain.

The honest take

Keep your expectations in check: this is a dumb resize, not a super-resolution model. Bilinear upscaling adds no new detail - it just stretches pixels. The point is geometry: matching sizes, feeding preprocessors, or setting up the geometry for a hires pass where the detail comes from the img2img sampling that follows, not from this node. For that role it's genuinely handy, and the per-axis factors let you widen or narrow an image independently, which fixed-ratio scalers won't.

Installing

cd ComfyUI/custom_nodes
git clone https://github.com/omar92/ComfyUI-QualityOfLifeSuit_Omar92.git

or search ComfyUI-QualityOfLifeSuit_Omar92 in ComfyUI Manager, then restart. No model downloads, no extra Python packages for this node.

Gotchas

  • If your workflow's model is SD 1.5/XL-class, keep MulOf46 enabled - the multiple-of-8 rounding is what stops you from generating into a latent size the VAE can't reconstruct cleanly.
  • The WidthFactor and HeightFactor widgets have a 10x max, so a single node caps at a 10× blowup; chain two if you somehow need more.
CategoryO/image

Inputs (6)

NameTypeDefaultDescription
imageIMAGE
upscale_methodCOMBO3 options: nearest-exact, bilinear, area
WidthFactorFLOAT1.25000–10
HeightFactorFLOAT1.25000–10
MulOf46COMBOenabled2 options: enabled, disabled
cropCOMBO2 options: disabled, center

Outputs (1)

NameTypeDescription
IMAGEIMAGE