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:
- 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).
- 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.
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.
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).
- 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.
Limitations and Future Work
Despite its strong performance, the authors note two primary limitations:
- 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.
- 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