NeurIPS 2026

StitchEdit Stitching Depth Priors into Image Editors
via Per-Layer Gradient Probing

The Hong Kong University of Science and Technology

† Corresponding author

Input image
A red car parked by a stone building
StitchEdit
A holly hedge in front of the red car, occluding its lower body
“Place a holly hedge in front of the car.”
Input image
Books to the left of a laptop and a cup to its right
StitchEdit
The cup moved to the left of the laptop and the books moved to the right
“Exchange the positions of the cups and the books.”

StitchEdit transfers a diffusion model’s depth priors to spatial image editing
through per-layer gradient probing and selective fine-tuning.

Qualitative Results

Spatial transformations, occlusion manipulation, viewpoint changes, and compound edits.

Input image
Input image: Move the yellow suitcase to the far-right reception area and scale it down with distance.
Qwen-Image-Edit
Qwen-Image-Edit: Move the yellow suitcase to the far-right reception area and scale it down with distance.
StitchEdit (Ours)
StitchEdit (Ours): Move the yellow suitcase to the far-right reception area and scale it down with distance.
Spatial transformation. “Move the yellow suitcase to the far-right reception area and scale it down with distance.”
Input image
Input image: Place the blue vase behind the lounge chair but in front of the tall plant.
Qwen-Image-Edit
Qwen-Image-Edit: Place the blue vase behind the lounge chair but in front of the tall plant.
StitchEdit (Ours)
StitchEdit (Ours): Place the blue vase behind the lounge chair but in front of the tall plant.
Occlusion manipulation. “Place the blue vase behind the lounge chair but in front of the tall plant.”
Input image
Input image: View the rattan chair from low rear-left so its woven back occludes most of the cushion.
Qwen-Image-Edit
Qwen-Image-Edit: View the rattan chair from low rear-left so its woven back occludes most of the cushion.
StitchEdit (Ours)
StitchEdit (Ours): View the rattan chair from low rear-left so its woven back occludes most of the cushion.
Viewpoint change. “View the rattan chair from low rear-left so its woven back occludes most of the cushion.”
Input image
Input image: Scale down the purple watering can, place it on the left end of the bench, and shift the camera right so a pot partly occludes it.
Qwen-Image-Edit
Qwen-Image-Edit: Scale down the purple watering can, place it on the left end of the bench, and shift the camera right so a pot partly occludes it.
StitchEdit (Ours)
StitchEdit (Ours): Scale down the purple watering can, place it on the left end of the bench, and shift the camera right so a pot partly occludes it.
Compound edit. “Scale down the purple watering can, place it on the left end of the bench, and shift the camera right so a pot partly occludes it.”
Input image
Input image: Place the clear glass pitcher behind the fruit basket and rotate its handle to face right.
Qwen-Image-Edit
Qwen-Image-Edit: Place the clear glass pitcher behind the fruit basket and rotate its handle to face right.
StitchEdit (Ours)
StitchEdit (Ours): Place the clear glass pitcher behind the fruit basket and rotate its handle to face right.
Compound edit. “Place the clear glass pitcher behind the fruit basket and rotate its handle to face right.”
Input image
Input image: Swap the blue planter and orange lantern, then orbit the camera 60 degrees clockwise.
Qwen-Image-Edit
Qwen-Image-Edit: Swap the blue planter and orange lantern, then orbit the camera 60 degrees clockwise.
StitchEdit (Ours)
StitchEdit (Ours): Swap the blue planter and orange lantern, then orbit the camera 60 degrees clockwise.
Compound edit. “Swap the blue planter and orange lantern, then orbit the camera 60 degrees clockwise.”

Abstract

Text-guided image editing with diffusion models struggles with spatial edits (e.g. manipulating objects, changing viewpoints, manipulating occlusions) that depend on the 3D structure understanding of a scene. Marigold and follow-up work demonstrate that a pretrained diffusion backbone already harbors strong geometric priors that can be activated for depth estimation, yet how to redirect these priors toward editing remains unresolved. Through per-layer gradient probing, we discover that the editing and depth objectives are compatible in early transformer layers but actively conflict in late layers, explaining why naive depth-conditioned editing either ignores geometry or degrades visual quality. We present StitchEdit, which first activates the backbone's geometric capability via a lightweight depth-denoising adapter, then selectively fine-tunes this adapter for editing using a probe-guided per-layer learning rate schedule that preserves depth knowledge where it helps and prunes it where it conflicts. On the proposed StitchEditBench, a benchmark of 150 geometry-dependent edits spanning spatial transformation, occlusion manipulation, and viewpoint change, StitchEdit consistently surpasses both instruction-based and depth-conditioned baselines on perceptual quality and geometric fidelity.

Methodology

Original paper method figure: Stage 1 depth activation, per-layer gradient probing, and Stage 2 selective editing fine-tuning
Depth activation, per-layer gradient probing, and probe-guided editing fine-tuning.

StitchEdit first activates the backbone’s geometric capability with a lightweight depth-denoising adapter. Per-layer gradient probing then measures the compatibility between depth and editing objectives: early layers cooperate, while late layers conflict. The probing profile guides both the per-layer learning-rate schedule and the pruning of conflicting adapters during editing fine-tuning.

Quantitative Results

Main results on StitchEditBench (150 test cases), as reported in Table 1 of the paper.

Scroll horizontally to view all metrics →

MethodLPIPS ↓DCS ↑CLIP-Dir ↑User Pref. ↑
Nano-Banana0.130.740.7816%
Qwen-Image-Edit0.140.710.7614%
Uniform FT0.140.800.7612%
StitchEdit (Ours)0.100.920.8158%

BibTeX

@inproceedings{guo2026stitchedit,
  title={StitchEdit: Stitching Depth Priors into Image Editors
         via Per-Layer Gradient Probing},
  author={Guo, Qin and Xu, Dan},
  booktitle={Advances in Neural Information Processing Systems},
  year={2026},
  url={https://openreview.net/forum?id=Q7G74v5nSs}
}