Superside Resize To Match
Bring the Result Back Up to the Original's Exact Size, Every Time
- image
- reference_image
- mask
- image
- mask
There's a workflow pattern this pack leans on hard: process an image at a smaller "working resolution" to keep API calls cheap and fast, then bring the result back up to the true original size before the final composite. The resize-back step is where things usually drift - if you do it with a hand-set number, it's wrong the day a different input walks in. Superside Resize To Match removes the math entirely: it resizes one image to exactly match another image's width and height.
How it works
You feed it an image and a reference_image, and it stretches the first to exactly the second's dimensions. Crucially, it's a pure full-frame resize - no cropping, no repositioning, no coordinate bookkeeping. That's the whole design point: a crop-and-stitch path tracks crop_x/y/w/h and can misalign; a full-frame resize has no coordinates to drift.
There's a mask companion, too. The optional mask input gets resized to the same target size right alongside the image, so the pair stays aligned for a downstream Image Composite Masked. The image uses your chosen upscale_method (default lanczos); the mask always uses bilinear, which is the right call - you don't want ringing artifacts on a mask's hard edges.
One behavior worth knowing: the mask output is always emitted. If you didn't provide a mask, it returns a zeros tensor at the target size - a fully black (empty) mask. That keeps the output contract stable so downstream composites never break, but don't mistake a black mask for a bug.
The inputs that matter
image- the one being resized.reference_image- the one whose dimensions are the target. The tooltip is the whole spec: "image is resized to exactly match this image's width/height."mask- optional, resized in lockstep.upscale_method- filter for the image, defaultlanczos.
Outputs: image and mask, both at the reference size. If the sizes already match, the node is a no-op and passes everything through untouched.
Installing it
Part of the comfyui-superside-nodes pack - install once:
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; it lives under the Superside category. Local-only, no API key, no model files.
Where it fits
The README is explicit about the intended slot: generate and composite at a smaller working resolution (e.g. via Superside Image Scale To Total Pixels), then resize the result and its mask back up to the true original size right before the final composite. Because the reference image is the original, the output is always exactly original-sized no matter what working resolution was used upstream. If you're building a retouch pipeline where the delivered file must be the same dimensions as what came in, this is the node that guarantees it without a single hardcoded number.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| reference_image | IMAGE | image is resized to exactly match this image's width/height. | |
| maskopt | MASK | — | |
| upscale_methodopt | COMBO | lanczos | Resampling filter for the image. The mask always uses bilinear. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |