Geometry-Editable and Appearance-Preserving Object Compositon

Jianman Lin, Haojie Li, Chunmei Qing, Zhijing Yang, Liang Lin, Tianshui Chen

TL;DR

The Disentangled Geometry-editable and Appearance-preserving Diffusion (DGAD) model solves a classic dilemma in image composition: how to flexibly alter an object's pose or shape while perfectly preserving its intricate textures. By implicitly learning geometric transformations during the encoding stage and explicitly retrieving fine-grained appearance details during decoding, DGAD achieves state-of-the-art object composition that is both highly editable and visually faithful.

What Problem Does This Paper Address?

General Object Composition (GOC) is the task of seamlessly inserting a target object into a new background scene. A truly robust GOC system needs to do two things at once:

  1. Geometric Editability: Modify the object's pose, viewpoint, or shape to naturally fit the new context (e.g., making a standing dog sit comfortably on a chair).
  2. Appearance Preservation: Keep the exact fine-grained details, textures, and identity of the original object intact.

Existing generative approaches usually fail at one of these tasks. Semantic-driven methods use compact embeddings (like CLIP) that excel at flexible geometric changes but discard high-frequency details, leading to identity drift. Conversely, reference-based methods extract pixel-aligned features to preserve textures but act like a rigid "copy-paste" tool, failing to adapt the object's geometry to the background.

Fig. 1: (a) Leverages compact semantic embeddings to enable object editability but fails to preserve appearance details. (b) Utilizes appearance features to retain visual fidelity, yet lacks editing capability. Unlike both, Our method implicitly learns the geometry-editable representation and explicitly aligns fine-grained appearance fea- tures with the geometry-edited representation, facilitating both precise geometry editing and faithful appearance preservation.

Methods

The authors introduce DGAD, which explicitly disentangles geometry editing from appearance preservation by splitting them across the diffusion model's encoding and decoding pipelines.

Fig. 2: Overview of the proposed Disentangled Geometry-editable and Appearance-preserving Diffusion (DGAD) framework. The model leverages semantic embeddings to implicitly capture the desired geometric transformations, and subsequently employs a dense cross-attention retrieval mechanism to align fine-grained appearance features with the geometry-edited representation. This design facilitates both precise geometry editing and faithful appear- ance preservation in object composition.

1. Geometry-Editable Encoder

During encoding, the model focuses purely on structure. The input consists of a multi-channel concatenation: a user-specified coarse mask, the background latent, and the noisy target latent. Crucially, the weights for these expanded channels are initialized by copying the pre-trained model's original weights to preserve spatial priors. CLIP/DINO semantic embeddings guide the cross-attention mechanism, allowing the backbone features to implicitly capture the target geometry and adapt it to the background context.

2. Appearance-Preserving Decoder

Once the geometric structure is established, the decoder's job is to fill it with the correct textures. DGAD introduces a Dense Cross-Attention mechanism. Here, the geometry-edited features from the encoder act as the query ($Q$), while fine-grained appearance features from a parallel reference network act as the key ($K$) and value ($V$).

To prevent textures from bleeding into the background or causing visual artifacts, a lightweight MLP learns a position-wise gating weight (softmask) directly from the query. This mask ensures that fine-grained appearance features are strictly anchored within the object's newly generated geometric boundaries, while a residual connection preserves the background scene context.

Datasets

  • Training: The model was trained on a large-scale dataset consisting of 386k images and 23k video samples. The authors utilized LaMa (a resolution-robust inpainting network) to remove foreground objects from the image data, creating clean pairs of background scenes, target objects, and ground-truth composites.
  • Evaluation: For benchmarking, the authors selected 30 object concepts from DreamBooth and paired them with 80 geometrically annotated images from the COCO-Val dataset, generating a comprehensive test suite of 2,400 synthesized evaluation samples.

Key Insights and Ideas

  • Disentanglement as a Pipeline Split: Instead of trying to force a single attention mechanism to balance texture and shape simultaneously, splitting them chronologically—geometry first in the encoder, texture second in the decoder—naturally resolves the optimization conflict.
  • Weight Inheritance Matters: Randomly initializing weights for new input channels (like the coarse mask) causes a distributional shift that degrades performance. Replicating pre-trained weights acts as a "warm start" that preserves the diffusion model's inherent spatial perception.
  • Gated Dense Attention vs. Global Attention: Standard cross-attention performs a global retrieval that smears details across the image. A learned, position-wise softmask acts as an adaptive valve, applying high-frequency textures only where the geometry dictates they belong.

Key Results

DGAD was evaluated against several competitive baselines (including IP-Adapter, PbE, ObjectStitch, AnyDoor, and MimicBrush) using metrics for editability (ImageReward, FID), appearance preservation (LPIPS, DISTS), and semantic consistency (CLIP/DINO scores).

Table 1: Competing with existing baselines. Metrics are grouped by functionality: editability, appearance preserva- tion, semantic consistency, and inference efficiency. Our method achieves superior performance across all categories while maintaining competitive efficiency. All inference times are measured on a single NVIDIA RTX 3090 GPU.
  • State-of-the-Art Performance: DGAD achieved a massive leap in editability, scoring 61.14 on ImageReward (IR) and reducing the FID to 15.04 (outperforming AnyDoor's FID of 26.08). It simultaneously maintained top-tier appearance preservation scores.
  • Foundation Model Efficiency: When scaled to an SDXL backbone, DGAD was compared against the massive, Flux-based InsertAnything model. DGAD-SDXL achieved a significantly better FID (13.57 vs 18.54) while being 3.7× smaller in parameter count and 3.5× faster during inference.
Table 2: Comparison between InsertAnything (Flux-based) and our DGAD (SDXL-based). Our method achieves superior realism (FID) and efficiency with only minor trade-offs in texture metrics. Red indicates improvement, while Green indicates degradation. The comparison column shows the absolute difference (∆) or relative factor.

Limitations and Future Work

Despite its strong performance, the authors note two primary limitations:

  1. Extreme View Synthesis: If a user requests a viewpoint that is entirely missing from the reference image (e.g., showing the back of an object), the model must hallucinate textures, which can lead to lower fidelity.
  2. Physical Consistency: Because the model operates entirely in 2D, it occasionally struggles with complex perspective laws or functional affordances, sometimes resulting in slightly floating objects or lighting misalignments.

Future Directions: The authors plan to integrate emerging 3D foundation models to infer latent 3D structures from 2D images, and leverage Multimodal Large Language Models (MLLMs) as "Scene Directors" to better reason about lighting and physics constraints.

Summary updated

BibTeX
@misc{lin2025geometry,
  author = {Jianman Lin and Haojie Li and Chunmei Qing and Zhijing Yang and Liang Lin and Tianshui Chen},
  title = {{Geometry-Editable and Appearance-Preserving Object Compositon}},
  year = {2025},
  eprint = {2505.20914},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.20914},
}
Figure