Nodes/ComfyUI-Inpaint-CropAndStitch/(OLD πŸ’€ use Crop instead) Resize Image Before Inpainting
ComfyUI Node

(OLD πŸ’€ use Crop instead) Resize Image Before Inpainting

Retired, now built into Inpaint Crop

By lquesadaΒ·Created 2 years agoΒ·Updated 2 months agoΒ· 1,136
(OLD πŸ’€ use Crop instead) Resize Image Before Inpainting
  • image
  • mask
  • optional_context_mask
  • image
  • mask
  • context_mask
β—„rescale_algorithmbicubicβ–Ί
β—„modeensure minimum sizeβ–Ί
β—„min_width1024β–Ί
β—„min_height1024β–Ί
β—„rescale_factor1.00β–Ί

InpaintResize - "Resize Image Before Inpainting" - is a deprecated helper from the Inpaint Crop and Stitch pack. Current ComfyUI titles it "(OLD πŸ’€ use Crop instead)", and that's the honest summary: its one job got absorbed into InpaintCropImproved, so there's no reason to add it to a new workflow. If you found it in an old graph, here's the deal.

What it did (and why it existed)

The idea was simple and genuinely useful at the time: bump the resolution of your input image before you inpaint, so the masked region has more pixels to work with and comes back sharper. Inpaint a face on a small image and you get a small, soft face; scale the image up first and the same fix lands with real detail. This node took an image and mask, resized both (either to a minimum size or by a factor), and passed them along to the crop step.

The catch is that this was always a pre-step you bolted onto Crop, and it could interact awkwardly with Crop's own features. So in the April 2025 rewrite the author pulled resizing inside the crop node as the preresize option - with ensure minimum resolution, ensure maximum resolution, or both. Same capability, one fewer node, no weird interactions. The README says it plainly: there's no drop-in replacement node because the feature now lives in Crop. That's why this one is marked obsolete rather than swapped for a "v2."

The inputs and outputs that matter

For anyone maintaining an old graph:

  • mode (default ensure minimum size) - either scale up until the image hits a minimum width/height, or scale by a fixed factor.
  • min_width / min_height (default 1024) - the floor the image is grown to in ensure minimum size mode.
  • rescale_factor (default 1) - the multiplier in factor mode. 2 doubles the resolution.
  • rescale_algorithm (default bicubic) - interpolation for the upscale.

Outputs are image, mask, and context_mask - the resized versions, meant to flow into the old crop node. To reproduce this today: skip the node, enable preresize on Inpaint Crop and pick the matching mode.

How to install it

It's in the pack, so installing the pack gives you the node (deprecated title and all). ComfyUI Manager: search ComfyUI-Inpaint-CropAndStitch. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/lquesada/ComfyUI-Inpaint-CropAndStitch.git

then restart ComfyUI. No models or heavy dependencies (GPL-3.0, by Luis Quesada Torres).

Common issues & troubleshooting

"(OLD πŸ’€ use Crop instead)" in the title. Not a bug - it's the deprecation flag. Your workflow still runs. The author's steer is to move resizing into Inpaint Crop's preresize.

Odd interactions with fill-mask-holes or outpainting. This is exactly the kind of awkwardness that motivated folding resize into Crop. If you're chaining this old node with other pre-steps and getting weird masks, that's your sign to consolidate onto the improved Crop node.

Blurry inpaint even after resizing. Resizing the input helps, but the crop still has to be sampled at your model's native resolution to gain real detail. On the modern node, set output_target_width/height to 512 (SD 1.5) or 1024 (SDXL/Flux) - that's where the sharpness actually comes from.

Categoryinpaint

Inputs (8)

NameTypeDefaultDescription
imageIMAGEβ€”
maskMASKβ€”
rescale_algorithmCOMBObicubic7 options: nearest, bilinear, bicubic, bislerp, lanczos, box, +1
modeCOMBOensure minimum size2 options: ensure minimum size, factor
min_widthINT10240–16384β€”
min_heightINT10240–16384β€”
rescale_factorFLOAT1.000.01–100β€”
optional_context_maskoptMASKβ€”

Outputs (3)

NameTypeDescription
imageIMAGEβ€”
maskMASKβ€”
context_maskMASKβ€”