Superside Resize (Long Side)
Cap the Long Edge Without Doing Aspect-Ratio Math Yourself
- image
- image
- width
- height
The moment you start batch-processing product images, you learn that "just cap it at 2048" is a tiny operation you end up rebuilding in every workflow. Superside Resize (Long Side) is that operation, packaged: scale an image so its longest side hits a target size, keep the aspect ratio, and - the part that saves you from wrecking small images - refuse to upscale by default.
Why it's useful in this pack
This pack sends a lot of images to fal.ai, and most of those endpoints have real input ceilings (the README even notes Z-Image's effective ~2048px long-edge cap). Uploading a 6000px catalogue photo to an API that's just going to clamp it wastes bandwidth, upload time, and sometimes silently degrades the result. Slapping a resize node in front of the API node and capping the long edge at 2048 or 1024 is the cheap, obvious win - and doing it without distorting the image is exactly what this node guarantees.
It's also a pure local utility: PIL under the hood, no model, no api_key, no network call. It just resizes.
How it works
The node finds the longer of width and height, scales the shorter side proportionally to keep the aspect ratio, and resizes the whole batch with a single chosen filter. For a batch of frames sharing one size (which ComfyUI IMAGE batches always do), the target is computed once from the first frame.
The inputs that matter
max_long_side- target pixels for the longest side, default 2048. This is the one you set.only_downscale- the safety rail. ON (default) means small images are left completely untouched and only oversized ones get shrunk. OFF forces the long side to exactly the target, which means it will upscale a 512px image to 2048 - usually a bad idea unless you have a reason.resample- the filter, defaultlanczos. Lanczos is the sharpest for photos; drop tobilinearif you're getting ringing on high-contrast edges and don't care about maximum sharpness.
Outputs are the resized image, plus width and height as INTs - handy if a downstream node (like a crop or a coordinate math node) needs to know the resulting dimensions without re-measuring.
Installing it
It ships in the comfyui-superside-nodes pack:
cd ComfyUI/custom_nodes
git clone https://github.com/Superside/comfyui-superside-nodes.git
cd comfyui-superside-nodes
pip install -r requirements.txt
Restart ComfyUI, find it under the Superside category. No model downloads, nothing extra to configure.
Where people get burned
Two ways. First, they forget only_downscale exists and wonder why a 4096px source came back at 2048 - that's the default doing its job. Second, they turn it OFF to "get more resolution" out of a small image and upscale a 512px crop to 2048, which looks soft and adds nothing - upscaling can't invent detail, it just spreads pixels around. If the source is genuinely under-resolved, the right move isn't this node, it's an actual upscaler like Superside SeedVR2 Upscale Image or Crystal Upscaler from the same pack. For everything that just needs to fit under a cap, this is the boring, correct tool.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| max_long_side | INT | 204816–16384 | Target size, in pixels, for the image's longest side. The shorter side scales proportionally. |
| only_downscaleopt | BOOLEAN | true | ON: only shrink images whose long side is bigger than the target; smaller images are left untouched (never upscaled). OFF: always set the long side to exactly the target, scaling up small images too. |
| resampleopt | COMBO | lanczos | Resampling filter. Lanczos gives the sharpest results for photos. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| width | INT | — |
| height | INT | — |