RC Image Scale
Resize without the quality cliff
- image
- IMAGE
Scaling is the operation every compositing workflow does a dozen times, and most people get it wrong by default: they stretch pixels with whatever resampler ComfyUI happened to give them and wonder why their overlaid logo looks mushy. RC Image Scale is the pack's take on doing it right - six scaling modes and four resampling algorithms, with LANCZOS as the default instead of an afterthought.
It's a utility node from the RC Image Compositor pack, and it's the quiet workhorse you reach for when you need to size an overlay to match a background before you composite it.
How it works
Two decisions, independent of each other: how to compute the target size, and how to resample when you get there.
Scaling modes (scale_method):
- percentage - multiply by
scale_factor(0.1–10×). - dimensions - exact width/height, with
keep_aspect_ratio(default on) protecting you from distortion. - fit_width / fit_height / fit_longest / fit_shortest - the "fit into this frame" family. Fit a 1024×1024 image to width 512 and it becomes 512×512; fit a 2048×1024 image and you get 1024×512. These are the ones that keep your aspect ratio while matching a target edge.
Resampling (resampling):
- LANCZOS - default. Highest quality, and on modern hardware the "slow" penalty is a rounding error. Just use it.
- BICUBIC - high quality, slightly softer.
- BILINEAR - medium. Fine for downscaling thumbs.
- NEAREST - pixel art. Only correct choice when you're scaling something that must stay pixel-sharp, like a sprite or a map.
The inputs that matter
- image - input tensor.
- scale_method and scale_factor (or width/height, depending on mode).
- resampling - LANCZOS unless you have a reason not to.
- keep_aspect_ratio - leave it on.
Output is a single IMAGE tensor at the new size.
How to install it
Ships with the RC Image Compositor pack:
cd ComfyUI/custom_nodes
git clone https://github.com/kj863257/ComfyUI_RC_Image_Compositor
cd ComfyUI_RC_Image_Compositor
pip install -r requirements.txt
Restart ComfyUI, or search "RC Image Compositor" in ComfyUI Manager. Dependencies are just pillow, numpy, and opencv-python.
Common issues
Two recurring mistakes. First, dimensions mode with keep_aspect_ratio off will happily squish a 1024×1024 into 512×1024 - there are legit uses (matte pulls, aspect-stretch VFX plates) but if your overlay suddenly looks wrong, this is the first thing to check.
Second, upscaling by a large factor here is not the same as real upscaling. LANCZOS interpolation up to 2× or 4× looks fine for compositing, but if you're trying to genuinely restore detail, this isn't the node - that's a job for a dedicated upscaler model. Use Image Scale to fit, not to enhance.
And a workflow note: the pack's RC Image Compositor has its own scale_mode that scales the overlay relative to the background while positioning it. If your only goal is "put this logo on that image at 30% of its width," you can skip the separate scale step entirely.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| scale_method | COMBO | percentage | Scale method: - percentage: Scale by percentage - dimensions: Exact dimensions - fit_width: Fit to width (keep ratio) - fit_height: Fit to height (keep ratio) - fit_longest: Fit to longest side (keep ratio) - fit_shortest: Fit to shortest side (keep ratio) |
| scale_factor | FLOAT | 1.00.1–10 | Scale factor (for percentage mode) |
| width | INT | 51264–8192 | Target width (for dimensions/fit modes) |
| height | INT | 51264–8192 | Target height (for dimensions/fit modes) |
| resampling | COMBO | LANCZOS | Resampling algorithm: - LANCZOS: Highest quality (slow) - BICUBIC: High quality - BILINEAR: Medium quality - NEAREST: Fastest (low quality) |
| keep_aspect_ratio | BOOLEAN | true | Keep aspect ratio (for dimensions mode) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |