π§΅ Qwen Image Stitch
Sew the edited crop back into the original without a visible seam
- processed_image
- stitch_data
- mask
- image
Here's the dirty secret of Qwen-Image-Edit work: the model re-emits the whole frame, so pixels you didn't ask about drift. The standard 2026 fix is to edit a crop and stitch it back. This node is the second half of that pipeline - the "put the edited region back in place" half - and it's deliberately boring in the best way. Give it the processed crop and the stitch metadata from the pack's Image Scale V2 node, and it composites the edit back into the original image with a feathered blend so the seam disappears.
What it takes in
Required:
processed_image- the edited/inpainted region from your pipeline.stitch_data- aSTITCH_DATAobject from ArchAi3D_Qwen_Image_Scale_V2. This is the contract that makes the node work: Image Scale V2 crops a region for processing and bundles the original image, the bounding-box coordinates, and the blend pixel count into this metadata. The stitch node unpacks it, so you never have to pass coordinates by hand.
Optional:
mask- a MASK for precise blending. White = use processed, black = use original; it gets scaled to the crop size. The key detail: if you provide a mask, it overrides the blend_mode feathering entirely. This is the control you want when a feathered edge isn't good enough - e.g. you have an actual inpaint mask from a segmentation pass.blend_override(-1 to 128) - overrides the blend pixel count from stitch_data. -1 means "use the value from stitch_data". Only applies when no mask is provided.blend_mode-feather(default),gaussian,hard, ormask_only. The first three are edge-blending strategies;mask_onlyuses the mask directly without edge feathering.debug- show debug info.
Output
One: image - the original image with the processed region composited in.
How it works
Unpack the bbox from stitch_data, scale the processed crop and mask back to the region, build a blend mask (feathered or gaussian falloff over blend_pixels, or hard-edged), and composite. The mask and blend_override inputs exist so you can take control when the automatic feather isn't matching the situation - an inpaint region with a hard boundary wants different treatment than a smooth tone change. It's a small, mechanical node, and that's the point: the compositing is where tiled Qwen edit pipelines live or die, and this removes the whole class of "let me paste this in Photoshop" manual work.
When to reach for it
The crop-edit-stitch loop: scale v2 β edit the crop with an encoder + sampler β stitch back. It's the architectural interior workflow in this pack - edit the countertop region, stitch it into the original room without the rest of the frame drifting. The KB's upscaling and inpainting docs tell the same story: region-based editing keeps the untouched pixels untouched, which is exactly what Qwen Edit's whole-frame re-emission doesn't do. If your edit workflow is already all-in-one-frame, you don't need this node yet; the moment you start cropping to protect the rest of the scene, you do.
Install
Pack install, once:
cd ComfyUI/custom_nodes
git clone https://github.com/amir84ferdos/ComfyUI-ArchAi3d-Qwen.git
cd ComfyUI-ArchAi3d-Qwen && pip install -r requirements.txt
Or ComfyUI Manager β "ArchAi3d Qwen". Restart, find it under ArchAi3d/Qwen/Image. You need the sibling Image Scale V2 node to produce the STITCH_DATA - the two are sold as a pair. Gotchas: blend seams show most on high-contrast edges, so when an edit sits against a sharp boundary, skip feathering and hand it a mask; and mask_only with a jagged inpaint mask can still show the mask boundary, so keep a small feather even there if you can.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| processed_image | IMAGE | The processed/inpainted cropped region from your pipeline. | |
| stitch_data | STITCH_DATA | Stitch data from Qwen Image Scale V2 containing original image and bbox info. | |
| maskopt | MASK | Optional mask for blending. White=use processed, Black=use original. Will be scaled to crop size. If provided, overrides blend_mode feathering. | |
| blend_overrideopt | INT | -1-1β128 | Override blend pixels (-1 = use value from stitch_data). Only used when no mask is provided. |
| blend_modeopt | COMBO | feather | Blend mode: feather/gaussian/hard (edge blending), mask_only (use mask directly without edge feather). |
| debugopt | BOOLEAN | true | Show debug info. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | β |