ComfyUI Node

Scaler | Side

The one-knob 'just make it bigger' rule from Some Image Processing Stuff

By wmpmiles·Created 2 years ago·Updated about a year ago· 5
Scaler | Side
    • scaler
    side_multiplier1.000

    The name undersells this node, so let's fix that first: Scaler | Side doesn't resize an image. It produces a sizing rule - a number that says "every side gets multiplied by this" - and you hand that rule to one of the pack's Resample nodes, which actually do the resizing. It's the difference between setting the destination and choosing the factor, and for a lot of jobs the factor is what you care about.

    It comes from wmpmiles/comfyui-some-image-processing-stuff, a small MIT-licensed utility pack (real name "Some Image Processing Stuff for ComfyUI") that splits resizing into two halves: resamplers (how the pixels get re-sampled - nearest-neighbor, Lanczos, Jinc, etc.) and scalers (how big the result should be). Scaler | Side is the simplest of the six scalers: one multiplier, applied to both dimensions. Aspect ratio is preserved by construction, which is the whole point of reaching for it instead of its sibling, Scaler | Sides Unlinked.

    Why you'd actually use it

    Because it's a uniform factor, it's the natural control for the classic two-pass workflow: generate at native resolution, then run a detail pass at low denoising strength on a 1.5–2x version. Want the pixel-space intermediate bigger first? Set side_multiplier to 1.5 and let it ride - you never have to think about whether the target is 768x768 or 1024x1024; the input's current size does that arithmetic for you. The same thinking applies to downscaling before a cheap preview or before feeding a ControlNet preprocessor. It's also what Mask-Crop Inpaint | Pre takes as its scaler input, so one factor controls how much breathing room the inpainting crop gets.

    There's a quality angle worth knowing: this pack's Resample Image converts the image to linear light, re-samples, then converts back. That's the "correct" way to resize, and it's why the pack's output holds up better than a naive pixel stretch - relevant when your scaler's job is to feed a low-denoise detail pass that will amplify any resampling artifacts.

    What you actually set

    • side_multiplier (FLOAT, default 1.0, min 0.001, step 0.001) - the only knob. 1.0 is a no-op; 1.5 makes every side 50% longer; 0.5 halves the image. It's a step of 0.001, so you get fine control, and the source rounds the result to whole pixels internally.

    The output is a single scaler value (type SCALER) - again, not pixels, a recipe. Wire it into the scaler input of Resample Image, Resample Mask, or Resample Latent, and pick a resampler (Lanczos is the sensible default for upscaling) on that same node. The mechanism is neat under the hood: the node returns a small closure that, given the current height/width, returns the scaled size. ComfyUI happily passes that function object between this pack's own nodes - which is also why it won't plug into anything outside the pack.

    Install

    The README skips install instructions entirely (it's a "for my own use and curiosity" project), so use the standard route. Via ComfyUI Manager, search for "Some Image Processing Stuff" and install - it's registered in the Comfy Registry. Or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/wmpmiles/comfyui-some-image-processing-stuff
    

    Then restart ComfyUI. Good news on the heavy-lifting front: the pack declares zero pip dependencies and needs no model files. It runs on torch, with a scipy import tucked in its core - and scipy ships with ComfyUI anyway, so there's nothing extra to download.

    Where people get burned

    • The scaler alone does nothing. If you wire Scaler | Side straight into an IMAGE input expecting a resized image, you get a type error - it only connects to this pack's scaler sockets. Always pair it with a Resample node.
    • Node-name collisions. "Scaler | Side" is generic, and other packs ship similarly named nodes. If the node you drag in doesn't have a scaler output, you've grabbed the wrong one - check the pack name in the node's footer.
    • It scales, it doesn't enhance. This is a geometric resize. If you need more detail, that's a generative upscaler (ESRGAN-class or a ControlNet Tile pass); if you need more pixels, this is exactly right.
    Categoryresampling/scaler

    Inputs (1)

    NameTypeDefaultDescription
    side_multiplierFLOAT1.000

    Outputs (1)

    NameTypeDescription
    scalerSCALER