ImageScaleFactor _O
Scale an image by a factor, not by pixels
- image
- IMAGE
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, orarea. For downscaling,areagives the cleanest result; for upscaling,bilinearis the usual default, andnearest-exactis 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-disabledorcenter. If your factors produce a non-multiple, or you're scaling with cropping in mind,centercrops 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
MulOf46enabled - the multiple-of-8 rounding is what stops you from generating into a latent size the VAE can't reconstruct cleanly. - The
WidthFactorandHeightFactorwidgets have a 10x max, so a single node caps at a 10× blowup; chain two if you somehow need more.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| upscale_method | COMBO | 3 options: nearest-exact, bilinear, area | |
| WidthFactor | FLOAT | 1.25000–10 | — |
| HeightFactor | FLOAT | 1.25000–10 | — |
| MulOf46 | COMBO | enabled | 2 options: enabled, disabled |
| crop | COMBO | 2 options: disabled, center |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |