Image_Resize_sum_restore
Paste a resized image back onto its original canvas
- resized_image
- stitch
- restored_image
- restored_mask
- original_image
This is the other half of Image_Resize_sum. You shrink or pad an image down to a working size, run it through a sampler or an effect, and then this node undoes the resize - cropping off any padding and scaling back to (or toward) the original dimensions - using the stitch receipt the resize step handed you. It's what makes the crop-shrink-process-restore workflow actually round-trip instead of leaving you stuck at whatever resolution you happened to process at.
How it works
Feed it the processed image and the matching stitch bundle, and it reverses exactly what Image_Resize_sum did: crops away padding, un-stretches or un-scales, and lands you back near the original canvas size. There's one extra control worth understanding, pad_crop_no_scale: when it's off (the default), the node rescales the image back to the original size using your chosen interpolation method. When it's on, it skips rescaling entirely and instead works out the size ratio between your input image and what Image_Resize_sum originally output, then crops the padded regions off using that same ratio - no resampling pass at all. That's the setting to reach for when something in between (an upscaler, for instance) already changed the resolution and you don't want this node blurring things further with a second resize.
The inputs and outputs that matter
resized_image(IMAGE, required) - the image coming out of your processing step, still at (or proportional to) the sizeImage_Resize_sumproduced.stitch(STITCH3, required) - the bundle from the matchingImage_Resize_sumcall. Same caveat as its sibling nodes: this is a pack-specific type, not interchangeable with thesolo_cropfamily'sSTITCH2.upscale_method- the interpolation algorithm for the restore scale (nearest-exact,bilineardefault,area,bicubic,lanczos). Only matters whenpad_crop_no_scaleis off.pad_crop_no_scale(BOOLEAN, default false) - see above: crop-only restore versus scale-and-crop restore.
Three outputs: restored_image, restored_mask, and original_image - the last one being the source image Image_Resize_sum was originally given, passed through for convenience so you can compare before/after without keeping a separate wire alive across your whole graph.
How to install it
ComfyUI Manager: search ComfyUI-Apt_Preset, install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/cardenluo/ComfyUI-Apt_Preset
pip install -r requirements.txt
install.bat is the Windows double-click installer; on Linux (comfy.icu's executor included) run pip install -r requirements.txt yourself. No models to fetch - this node is geometry, not generation.
Common issues
The single most common mistake is pairing this with the wrong stitch. It only accepts STITCH3, produced exclusively by Image_Resize_sum - if you built your crop with Image_solo_crop/Image_solo_crop2 instead, you want Image_solo_stitch, not this node, and the wire simply won't connect if you try to mismatch them.
Second: if your restored image looks slightly soft compared to the original, that's usually two resize passes stacking (the original shrink, then this node's restore scale) rather than a bug - each resample loses a little sharpness. If your downstream processing didn't change the resolution, flip on pad_crop_no_scale to restore via crop alone and skip the second resample entirely.
And the standard pack-wide note: this is one node in a large, actively maintained suite, and a fresh install pulls in its full requirements.txt (onnxruntime, gguf, transparent-background, scenedetect, and more, for the pack's other 100+ nodes). There's a documented case of a from-scratch ComfyUI-Apt_Preset install failing to import - if that happens, the real error is printed in the ComfyUI console above the generic failure line, so check there before assuming this specific node is at fault.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| resized_image | IMAGE | — | |
| stitch | STITCH3 | — | |
| upscale_method | COMBO | bilinear | 5 options: nearest-exact, bilinear, area, bicubic, lanczos |
| pad_crop_no_scale | BOOLEAN | false | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| restored_image | IMAGE | — |
| restored_mask | MASK | — |
| original_image | IMAGE | — |