Scale Image
Cap the long side, keep the aspect ratio, move on
- image
- image_out
Every model has a resolution it was actually trained at, and feeding it something wildly off that - an 1800px-wide reference image, a control image someone handed you at a random size - is a common way to get duplicated anatomy, weird tiling, or a checkpoint that just doesn't understand what it's looking at. ScaleImageAspectNode's whole job is the boring fix for that: give it one number, the maximum size for whichever side is longer, and it scales the image down (or up) so the long edge hits that number, with the short edge following proportionally. Aspect ratio never moves.
There's no separate width/height math for you to get wrong here - you're not setting two numbers that might not agree. You set one ceiling, and the node does the ratio-preserving scale math for you, then applies whichever interpolation algorithm you picked to actually resample the pixels.
The inputs and outputs that matter
Three required fields:
image(IMAGE) - what you're resizing.max_side(INT, default0, range 0–16384, step 64) - the target size for the longer dimension. The default of0isn't a meaningful size to run with, so this is the one field you actually need to set before the node does anything useful - don't leave it at default and expect a resize to happen. The step of 64 isn't arbitrary either: most modern architectures want dimensions divisible by 64 (Flux included), so nudging in steps of 64 keeps you landing on numbers your model will actually like.interpolation- a dropdown of the standard resampling modes:nearest,bilinear,bicubic,area,nearest-exact,lanczos. For photographic downscaling,lanczosorbicubicgive the cleanest result;areais the better call for a heavy shrink (say, cutting a huge reference way down);nearest/nearest-exactskip blending entirely, so they're for content where you want hard edges preserved - pixel art, or a mask you don't want softened - and they'll look visibly blocky on a normal photo.
The output is image_out (IMAGE) - wire it into whatever expects a properly-sized image next: your sampler's reference input, a ControlNet preprocessor, a save node.
How to install it
Through ComfyUI Manager, search "DemonAlone-nodes-ComfyUI" and install. By hand:
cd ComfyUI/custom_nodes
git clone https://github.com/DemonAlone/SimpeStringGenerator_ComfyUI
then restart ComfyUI. The clone URL is still the pack's original name, SimpeStringGenerator_ComfyUI - it now presents as "DemonAlone-nodes-ComfyUI" everywhere else, but it's the same repo either way. No models to fetch, nothing heavy - it's a plain image-processing utility.
Common issues & troubleshooting
Nothing seems to happen. Check max_side first - it defaults to 0, which isn't a usable target dimension. Set it to whatever you actually want the longer side capped at.
Photos look blocky, or a mask looks soft when it shouldn't. That's the interpolation mode fighting the content. nearest/nearest-exact are the right choice for hard-edged content and the wrong choice for photographic images; lanczos/bicubic are the reverse. If output looks wrong, that's almost always the first thing to check, not a bug in the node.
No community threads to lean on. This pack has essentially no footprint outside its own repository, so if something's genuinely off, the short source file is a faster path to an answer than searching for it online.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| max_side | INT | 00–16384 | — |
| interpolation | COMBO | 6 options: nearest, bilinear, bicubic, area, nearest-exact, lanczos |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image_out | IMAGE | — |