NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

ControlCom: Controllable Image Composition using Diffusion Model

Bo Zhang, Yuxuan Duan, Jun Lan, Yan Hong, Huijia Zhu, Weiqiang Wang, Li NiuarXiv 2023 · DOI

Abstract

ControlCom is a unified diffusion-based framework designed for controllable image composition. Unlike previous black-box generative models that often sacrifice foreground identity, ControlCom introduces a 2D indicator vector to steer the composition process across four distinct tasks: blending, harmonization, view synthesis, and full generative composition. By utilizing a two-stage "global-to-local" fusion strategy, the model effectively balances high-level semantic consistency with fine-grained texture preservation. Experimental results on the COCOEE and the newly introduced FOSCom datasets demonstrate that ControlCom achieves state-of-the-art performance in both realism and foreground fidelity.

Introduction

Image composition—the process of seamlessly integrating a foreground object into a target background—is a fundamental task in photo editing. Achieving a realistic result is challenging because it requires aligning the foreground and background across multiple dimensions: lighting (illumination), perspective (pose), and edge blending.

Historically, researchers have treated these as isolated sub-problems, such as Image Blending for edge refinement, Harmonization for light matching, and View Synthesis for perspective correction. While recent diffusion-based generative models attempt to solve these issues simultaneously, they often operate as "black boxes" without user steerability. Furthermore, these models frequently "hallucinate" details, causing the foreground object to lose its specific identity, such as unique textures or text. ControlCom addresses these challenges by providing a single, unified model that is both controllable and high-fidelity.

Controllable Image Composition

The core innovation of ControlCom is the Indicator Vector $S = (s_{illum}, s_{pose})$. This 2D vector is injected into the diffusion process to act as a four-way switch, allowing users to selectively adjust the foreground's properties:

  • (0, 0) Blending: Preserves original illumination and pose.
  • (1, 0) Harmonization: Adjusts illumination to match the background while keeping the pose.
  • (0, 1) View Synthesis: Adjusts the pose/perspective while keeping the original lighting.
  • (1, 1) Composition: Adjusts both illumination and pose for maximum realism.
ControlCom framework overview showing the four controllable composition modes steered by the 2D indicator vector.

Methodology: Global-to-Local Fusion

To maintain high fidelity to the original foreground object while allowing for the adjustments specified by the indicator vector, the authors developed a two-stage fusion strategy.

1. Foreground Encoder

The model uses a CLIP-based image encoder to extract two types of information. Global Fusion utilizes the CLIP class token to provide high-level semantic context (e.g., identifying the object as a "car"). Simultaneously, Local Enhancement leverages CLIP patch tokens to capture fine-grained spatial details.

2. Controllable Generator

The generator integrates these features into a Diffusion U-Net. A key component is the Local Enhancement Module, which uses RoIAlign to map foreground features directly onto the target bounding box. It employs a feature modulation technique (inspired by SPADE) to "paint" specific textures back onto the generated object, ensuring that details like brand logos or intricate patterns are preserved.

The detailed architecture of ControlCom, featuring a two-stage fusion strategy with a Foreground Encoder and a Controllable Generator.

Training and Evaluation

ControlCom is trained using a self-supervised synthetic pipeline. The authors utilized the Open Images dataset (1.9 million images), extracting objects and applying random geometric and color augmentations to create "mismatched" pairs. The model then learns to reconstruct the original ground truth from these augmented inputs.

For evaluation, the authors used the standard COCOEE benchmark and introduced a new, more challenging real-world dataset called FOSCom (Foreground Object Search Composition). FOSCom contains 640 pairs of backgrounds and foregrounds specifically selected to test model performance on realistic discrepancies.

Key Results

ControlCom was compared against state-of-the-art models, including Paint-by-Example (PbE) and ObjectStitch.

  • Quantitative Performance: On the COCOEE benchmark, ControlCom achieved an FID of 3.19, outperforming ObjectStitch (3.35). Crucially, it scored significantly higher in CLIP foreground similarity, proving its superior ability to preserve object identity.
  • Qualitative Fidelity: Visual comparisons demonstrate that while competing models often alter the specific characteristics of an object (e.g., changing a dog's breed), ControlCom keeps these details intact while naturally adapting the object to the background's environment.
  • User Preference: In a human study on the FOSCom dataset, raters preferred ControlCom’s results for foreground fidelity by a wide margin, ranking it 1.14 compared to ObjectStitch's 2.26.

Conclusion and Future Work

ControlCom demonstrates that effective control in diffusion models does not require complex text prompts; a simple binary indicator can successfully steer a model through distinct image-processing tasks. By unifying blending, harmonization, and view synthesis into one framework, the model avoids the error accumulation typical of sequential pipelines.

Future work will focus on improving extreme view synthesis, where the model currently struggles to hallucinate missing sides of an object when the required perspective change is too drastic. The authors suggest that incorporating 3D-aware priors could further enhance the model's geometric flexibility.

Summary updated

BibTeX
@misc{zhang2023controlcom,
  author = {Bo Zhang and Yuxuan Duan and Jun Lan and Yan Hong and Huijia Zhu and Weiqiang Wang and Li Niu},
  title = {{ControlCom: Controllable Image Composition using Diffusion Model}},
  year = {2023},
  eprint = {2308.10040},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2308.10040},
}
Figure