Object-level Visual Prompts for Compositional Image Generation

Gaurav Parmar,Or Patashnik,Kuan-Chieh Wang,Daniil Ostashev,Srinivasa Narasimhan,Jun-Yan Zhu,Daniel Cohen-Or,Kfir Aberman
2025-01-03
Abstract:We introduce a method for composing object-level visual prompts within a text-to-image diffusion model. Our approach addresses the task of generating semantically coherent compositions across diverse scenes and styles, similar to the versatility and expressiveness offered by text prompts. A key challenge in this task is to preserve the identity of the objects depicted in the input visual prompts, while also generating diverse compositions across different images. To address this challenge, we introduce a new KV-mixed cross-attention mechanism, in which keys and values are learned from distinct visual representations. The keys are derived from an encoder with a small bottleneck for layout control, whereas the values come from a larger bottleneck encoder that captures fine-grained appearance details. By mixing keys and values from these complementary sources, our model preserves the identity of the visual prompts while supporting flexible variations in object arrangement, pose, and composition. During inference, we further propose object-level compositional guidance to improve the method's identity preservation and layout correctness. Results show that our technique produces diverse scene compositions that preserve the unique characteristics of each visual prompt, expanding the creative potential of text-to-image generation.
Computer Vision and Pattern Recognition,Artificial Intelligence,Graphics
What problem does this paper attempt to address?
The problem that this paper attempts to solve is how to generate semantically coherent and diverse image combinations through object - level visual prompts in text - to - image generation models. Specifically, the paper aims to: 1. **Preserve the object identities in the input visual prompts**: Ensure that the generated images are faithful to the input visual prompts and maintain the unique characteristics of the objects. 2. **Generate diverse and flexible image combinations**: Generate diverse images in different scenes and styles, while supporting changes in object arrangement, pose, and composition. 3. **Overcome the limitations of existing methods**: Existing image prompting methods (such as IP - Adapters) have two main problems: - Unable to distinguish and control individual objects in the scene. - Difficulties in balancing object identity preservation and generation diversity. To achieve these goals, the paper introduces a new KV - mixed cross - attention mechanism, which combines two encoders: - **Global Encoder (Coarse Encoder)**: Used to extract layout information and control the spatial structure of the generated image. - **Local Encoder (Fine - Grained Encoder)**: Used to capture fine - grained appearance details and ensure the identity characteristics of the objects. In addition, the paper also proposes an object - level compositional guidance method to further improve the identity preservation and layout correctness of the generated images. Through these innovations, VisualComposer can maintain a high degree of fidelity to the input visual prompts while generating diverse images.