TL;DR
EliGen is a new framework for generating images with fine-grained control over individual entities. It introduces "regional attention" to integrate entity-specific prompts and arbitrary-shaped masks into diffusion models, achieving superior spatial precision and image quality. The authors also release a new dataset and demonstrate EliGen's versatility in inpainting and integration with other creative AI tools.
What Problem Does This Paper Address?
Current text-to-image diffusion models, while impressive, struggle with precise control over individual elements within a generated image. Global text prompts often fail to capture the nuances of spatial relationships, object counts, and specific entity attributes. This limitation hinders the creation of complex, highly customized images. Existing methods for entity-level control often rely on restrictive bounding boxes or require significant architectural changes, limiting their flexibility and generalizability.
Methods
EliGen tackles this by introducing a novel regional attention (RA) mechanism. This mechanism is designed to work within existing diffusion transformer architectures (like DiT) without requiring additional parameters. RA seamlessly integrates entity-specific text prompts and arbitrary-shaped spatial masks. It achieves this by creating joint attention masks that guide the model to focus on specific regions for each entity.
Key aspects of the method include:
- Regional Attention: This mechanism allows diffusion transformers to attend to specific regions of the image based on entity prompts and masks. It uses a "soft-coding" approach to represent spatial localization, making it more flexible than bounding boxes.
- Entity-Level Control: The model learns to associate local text prompts and spatial masks with individual entities, enabling precise placement and attribute control.
- Inpainting Fusion Pipeline: This technique extends EliGen's capabilities to image inpainting, allowing for precise modifications within specific regions while preserving the background.
- Integration with Existing Models: EliGen is designed to be compatible with other open-source tools like IP-Adapter, In-Context LoRA, and MLLMs, unlocking advanced creative workflows.
Datasets
- Training Dataset: The authors created a new dataset of approximately 500K training samples with 1.27M entity annotations. This dataset was generated using FLUX.1-dev for image creation and Qwen2-VL 72B for captioning and entity annotation. The images are generated by the baseline model to ensure a distribution that aligns with the model's output, avoiding stylistic inconsistencies seen with datasets like Laion.
- Evaluation Datasets: The paper uses the filtered COCO 2017 validation set for quantitative evaluations.
Key Insights and Ideas
- Arbitrary Masks are Key: Moving beyond bounding boxes to arbitrary-shaped masks is crucial for truly flexible and creative entity-level control.
- Soft-Coding for Spatial Localization: Representing spatial information as a "soft" region of influence rather than rigid coordinates leads to better generalization and robustness.
- Dataset Alignment Matters: Using generated images for training the entity-level control model is vital to avoid distribution mismatches that degrade performance.
- Regional Attention is Trainable: While untrained regional attention can modify local details, fine-tuning it on an annotated dataset unlocks precise layout control.
- Synergy with Other Models: EliGen's true power lies in its ability to integrate with existing creative AI tools, enabling complex workflows like styled entity control and dialogue-based image editing.
Key Results
- Quantitative: EliGen outperforms existing methods on the COCO benchmark in terms of Entity Success Rate and Image Quality (CLIP score and Aesthetic Score). It achieves an Entity Success Rate of 88.41% and a Spatial Accuracy (mIoU) of 73.93%.
- Qualitative:
- EliGen demonstrates superior spatial precision and image quality compared to methods like Instance Diffusion, GLIGEN, and MIGC, especially in complex layouts.
- It excels in handling arbitrary-shaped masks, outperforming Instance Diffusion in image quality and positional accuracy.
- The inpainting fusion pipeline preserves background integrity and enables harmonious blending of inpainted entities.
- When integrated with IP-Adapter, EliGen can achieve styled entity control, mirroring the style of a reference image.
- Integration with MLLMs allows for dialogue-based image design and editing.
Limitations and Future Work
- Spatial Accuracy vs. Coherence: The paper notes that while EliGen prioritizes image coherence, its soft-coding approach might lead to slightly lower quantitative spatial accuracy metrics compared to methods that strictly adhere to input coordinates. This is a trade-off for improved overall image quality and robustness.
- Future Work: The authors suggest that EliGen's integration with other models opens up numerous creative possibilities, implying future work in exploring these extensions further. The paper also highlights the potential for generating coherent image sequences with continuous entity movement and complex actions.
Summary updated