Nodes/ComfyUI_RaykoStudio/๐ŸฆŠ RS Upscale & Resize
ComfyUI Node

๐ŸฆŠ RS Upscale & Resize

An 'upscaler' that won't invent detail (and does the VAE math for you)

By RaykosanยทCreated about a year agoยทUpdated a day agoยท 78
๐ŸฆŠ RS Upscale & Resize
  • image
  • IMAGE
  • width
  • height
โ—„width0โ–บ
โ—„height0โ–บ
โ—„upscale_methodlanczosโ–บ
โ—„scale_by2.00โ–บ
โ—„methodstretchโ–บ
โ—„conditionalwaysโ–บ
โ—„multiple_of8โ–บ

The name says "Upscale," but the first thing to know about RS Upscale & Resize is that it's an interpolator, not a detail machine. No model, no API key, no GPU drama - it resizes pixels with math and adds no new content. In the upscaling world that's the "more pixels" job, as opposed to the "more detail" job that SeedVR2, SUPIR and friends do. If you want the image bigger without it hallucinating pores, this is your node. If you want it to invent detail, this is the boring-but-necessary first step, and you pair it with a real upscaler afterwards.

It ships in the RaykoStudio pack, a one-developer collection (the author posts update threads on r/StableDiffusion as Reykoon). Think of it as a smarter version of ComfyUI's built-in ImageScaleBy, built for the tiled and VAE workflows where the native node's output size and divisibility start to bite.

How it works

It has two modes, and the mode is decided by your width/height widgets. Leave both at 0 and it multiplies the image by scale_by - a smart ImageScaleBy. Set either one above 0 (or wire a value into it) and it switches to absolute sizing, with the unset dimension computed to keep the aspect ratio. External dimensions always win over scale_by; there's no middle ground.

Then, in a single pass, it resizes with your chosen method - lanczos by default, which routes through comfy.utils.lanczos (the good stuff), or bicubic/bilinear/nearest-exact/area via torch's interpolate. method decides how the image fits the target box: stretch forces it, keep proportion fits inside, pad letterboxes it (with black bars), fill / crop covers and center-crops. condition gates whether anything happens at all - "downscale if bigger" leaves small images alone, which is how you get an upscale-only node into a shared workflow without it wrecking big inputs. Finally multiple_of center-crops the result to a clean multiple of 8/16/32/64 so the VAE downstream doesn't complain about non-divisible sizes. It outputs the image plus the final width and height as integers, which you can wire into anything that needs to know what it actually produced.

Inputs worth touching

  • scale_by (default 2) - your multiplier, up to 8x.
  • width / height (default 0) - leave 0 for scale mode; set or wire them for exact dimensions. Handy when a tiling node or a Get Image Size hands you a target.
  • multiple_of (default 8) - snap to VAE-friendly multiples. SD1.5/SDXL are happy with 8; if you're feeding Flux, 16 or 64 is the safer pick.
  • upscale_method - lanczos unless you have a reason.
  • condition - the one beginners overlook. "always" resizes every time; the other options make it conditional so it never upscales a big image or never shrinks a small one.

Installing

ComfyUI Manager, search "ComfyUI_RaykoStudio", or:

cd ComfyUI/custom_nodes
git clone https://github.com/Raykosan/ComfyUI_RaykoStudio.git

restart ComfyUI. No model files, nothing to download, runs on CPU if it has to. The pack's requirements.txt lists pycairo and opencv-python for its text and adjustment nodes - this node doesn't import either. Because the pack imports each module separately and skips failures, a missing optional dependency won't take this node down with it.

Where people get burned

  • The precedence trap: if you've set width or height, scale_by does nothing. Looks like a bug; it's the design. Zero them out to get back to scale mode.
  • It adds no detail. Don't treat a geometric resizer as a detail adder and then judge the workflow on that. If the source is soft, run it through an ESRGAN model (the pack's RS Upscaler does that) or a generative restorer after this node.
  • pad means black bars; fill / crop means lost edges. If the bars or the crop surprise you, that's method doing its job, not a bug.
  • multiple_of crops rather than stretches. You lose a handful of pixels off the edges to land on the multiple. For most workflows that's the right trade - it keeps your composition intact instead of squashing it.

For tiled diffusion, hi-res fix prep, or any "I just need it this exact size and the VAE to not complain" moment, it's a clean single node. Just remember what it is: geometry, not alchemy.

Category๐ŸฆŠ RaykoStudio

Inputs (8)

NameTypeDefaultDescription
imageIMAGEโ€”
widthINT00โ€“16384โ€”
heightINT00โ€“16384โ€”
upscale_methodCOMBOlanczos5 options: lanczos, bicubic, bilinear, nearest-exact, area
scale_byFLOAT2.000.01โ€“8โ€”
methodCOMBOstretch4 options: stretch, keep proportion, fill / crop, pad
conditionCOMBOalways5 options: always, downscale if bigger, upscale if smaller, if bigger area, if smaller area
multiple_ofCOMBO84 options: 8, 16, 32, 64

Outputs (3)

NameTypeDescription
IMAGEIMAGEโ€”
widthINTโ€”
heightINTโ€”