Nodes/comfyUI-TiledWan/TiledWan Inpaint Stitch Improved
ComfyUI Node

TiledWan Inpaint Stitch Improved

The node that pastes inpainted video back so nothing else moves

By Baverne·Created about a year ago·Updated 7 months ago· 8
TiledWan Inpaint Stitch Improved
  • stitcher
  • inpainted_image
  • image
stitch_modemask_only
blend_strength1.00

This is the quiet half of the pair, and the one that actually delivers the promise crop-and-stitch inpainting is famous for: the pixels you didn't mask stay bit-identical. TiledWan Inpaint Stitch Improved takes the stitcher record and the inpainted crop from its sibling node and reconstructs the full-resolution image - or a whole batch of video frames - scaling, translating, and blending so the fixed region lands exactly where the mask said it should.

It's part of Baverne's comfyUI-TiledWan pack, a set built to run Wan 2.1 VACE video inpainting on footage larger than the model's native 832×480 / 81 frames. The stitch node is a rework of lquesada's Inpaint-CropAndStitch, modified to ignore size variation across frames and to handle masks that appear and disappear - both of which are what keep a moving inpaint from strobing. On its own it's just as useful for stills; the mechanism doesn't care.

How it works: the stitcher object carries everything the crop node learned - canvas coordinates, the context-to-target scaling, the blending mask built during cropping. Stitch reads that, resizes the inpainted result back into its slot in the original, and composites. The stitch_mode pick controls how much of the crop comes back:

  • mask_only (default) - only the masked pixels are replaced. Unmasked context is left exactly as it was. This is the mode for object removal and edits where nothing else should move.
  • entire_crop - the whole cropped region is replaced with the inpainted version.
  • blend_entire - the entire crop is feathered into its surroundings, handy when the inpainted content diverges a lot from the original and you want to hide the seam.

blend_strength (0–1) only affects the blend modes: 1.0 means full inpainted result, 0.0 keeps the original.

Inputs: stitcher (the STITCHER output from TiledWan Inpaint Crop Improved), inpainted_image (whatever your model produced between crop and stitch), and the two controls above. One output: image, the reconstructed full-resolution result.

Use the crop and stitch nodes from the same install. The STITCHER type is pack-internal, and mixing versions or cross-wiring with lquesada's original nodes is asking for a shape mismatch. If coordinates or sizes do go wrong, check that your inpainting stage actually preserved the crop's resolution - most mismatch complaints trace back to a model that resized its input behind your back.

Install: ComfyUI Manager (search "comfyUI-TiledWan"), or cd ComfyUI/custom_nodes && git clone https://github.com/Baverne/comfyUI-TiledWan, then restart. The pack declares no extra pip dependencies.

And the honest warning, straight from the README: this workflow's output is meant to be recomposited. It's a solid workbase for VFX but rarely satisfying out of the box - Wan 2.1 VACE can shift color even in unmasked regions. Don't expect a clean hero shot; expect a good plate to build on.

Categoryinpaint

Inputs (4)

NameTypeDefaultDescription
stitcherSTITCHERStitcher data from InpaintCropImproved containing reconstruction information including canvas coordinates, dimensions, and blending masks.
inpainted_imageIMAGEThe inpainted image(s) to be stitched back. Should correspond to the cropped output from InpaintCropImproved after inpainting.
stitch_modeCOMBOmask_onlyStitching method: 'mask_only' blends only masked areas, 'entire_crop' replaces the entire cropped region, 'blend_entire' smoothly blends the entire crop with surrounding areas.
blend_strengthFLOAT1.000–1Strength of blending operation. 1.0 = full inpainted result, 0.0 = original image preserved. Only affects blend modes.

Outputs (1)

NameTypeDescription
imageIMAGEReconstructed full-resolution image(s) with inpainted content seamlessly integrated. Maintains original dimensions and quality.