Composer: Creative and Controllable Image Synthesis with Composable Conditions

Lianghua Huang, Di Chen, Yu Liu, Yujun Shen, Deli Zhao, Jingren Zhou · DOI

Abstract

While large-scale diffusion models have revolutionized image synthesis, they often lack the granular control required for professional design and creative workflows. This paper introduces Composer, a generative framework that treats image synthesis as a modular composition task. By decomposing images into independent representations—such as sketches, depth maps, color palettes, and semantic embeddings—and training a model to reconstruct images from these parts, Composer enables unprecedented control. This approach allows users to manipulate specific visual elements with surgical precision, effectively reformulating traditional vision tasks like style transfer and colorization into simple conditional generation problems.

Introduction

Modern generative models like Stable Diffusion and DALL-E 2 are often criticized for being "black boxes." While they can generate high-quality images from text prompts, achieving a specific layout, color scheme, or structural constraint simultaneously is notoriously difficult. A designer might possess a specific sketch for a layout and a specific color palette from a photograph, but current models struggle to respect both constraints without extensive prompt engineering or fine-tuning.

The core challenge lies in a lack of compositionality. Most models are trained to map a single condition (typically text) to an image. Composer shifts this paradigm by learning to recompose an image from a set of independent, discrete factors. By breaking down the image into eight distinct representations, the model expands the control space exponentially. Theoretically, if a model understands eight different types of representations across a dataset, the potential combinations for synthesis reach $100^8$, providing a massive playground for creative exploration.

Methodology

Composer utilizes a multi-conditional diffusion model based on the GLIDE architecture with a UNet backbone. The framework operates through two distinct phases: Decomposition and Composition.

1. Decomposition

During training, images are decomposed into eight representative factors using standard computer vision algorithms or pretrained models:

  • Global Representations: These include text captions (via CLIP), semantic/style embeddings (via CLIP), and color statistics (represented as CIELab histograms).
  • Local Representations: These include structural elements like sketches (edge detection), instance masks (YOLOv5), depth maps, grayscale intensity, and editable region masks.

2. Composition

The model is trained to reconstruct the original image from these factors. Global conditions are integrated by projecting embeddings into the timestep embedding or utilizing them as context for cross-attention layers. Local conditions, such as spatial maps (sketches or depth), are projected into embeddings of the same resolution as the noisy latent. These are then summed and concatenated before being processed by the UNet.

Joint Training Strategy

A critical innovation in Composer is the Joint Training Strategy. To ensure the model can handle any combination of inputs at inference time, the authors employ a high dropout rate (0.5) for each condition during training. This forces the model to learn how to generate a coherent image even when most conditions are missing or when the provided conditions are disparate. This strategy is what allows the model to function effectively with only a subset of inputs, such as a sketch alone or a text prompt with a color palette.

Implementation and Training

The model was trained at scale using a massive dataset aggregate, including ImageNet21K, WebVision, and a filtered version of LAION-5B (approximately 1 billion images with aesthetic scores above 7.0). Evaluation and benchmarking were primarily conducted using the COCO dataset.

Key Insights

Reformulation of Specialized Tasks

One of the most significant findings is that traditional, specialized computer vision tasks are simply specific configurations of Composer’s conditions. For instance:

  • Style Transfer: Achieved by providing the "content" representations (e.g., sketch or depth) of one image and the "style" representations (CLIP embeddings) of another.
  • Colorization: Achieved by conditioning on a grayscale intensity map and a text prompt.
  • Inpainting: Handled natively by the "editable region" mask, making it a first-class citizen of the generation process rather than a separate task.

The Role of Intensity

The authors observed that grayscale intensity images contain so much information that the model tended to ignore other conditions. To mitigate this, they applied a higher dropout rate (0.7) to intensity images, forcing the model to prioritize text and structural cues like sketches.

Conflict Resolution

When conditions conflict—such as a sketch of a dog paired with a depth map of a car—the model develops a hierarchy of importance. It typically prioritizes the representation with the highest level of detail (like the sketch) while attempting to harmonize the overall image into a coherent visual.

Results and Performance

Despite its multi-task nature, Composer remains highly competitive with specialized models. It achieves a zero-shot FID of 9.2 on the COCO dataset using only captions, placing it on par with state-of-the-art text-to-image models.

Beyond standard generation, Composer excels in zero-shot versatility for complex tasks:

  • Virtual Try-on: By masking a person's clothing and conditioning on a specific garment's CLIP embedding.
  • Pose Transfer: By using a segmentation map to define pose and a CLIP embedding to maintain identity.
  • Interpolation: By traversing the embedding space of global representations, the model can smoothly blend two images while keeping local elements (like background or pose) constant.

Limitations and Conclusion

While powerful, Composer is not without limitations. Without global embeddings, the model sometimes struggles with lighting and exposure, occasionally producing overly dark images. Furthermore, when text and image embeddings conflict significantly, the model tends to favor the visual prompt, downweighting the text.

Finally, the high degree of control offered by Composer—particularly in pose manipulation and virtual try-on—raises safety concerns regarding the generation of deceptive content. Future iterations will require robust filtering and safety mechanisms to ensure the tool is used responsibly in creative industries.

Summary updated

BibTeX
@inproceedings{huang2023composer,
  author = {Lianghua Huang and Di Chen and Yu Liu and Yujun Shen and Deli Zhao and Jingren Zhou},
  title = {{Composer: Creative and Controllable Image Synthesis with Composable Conditions}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=23Bmw3B1xJ},
}
Figure