Generating compositional scenes via Text-to-image RGBA Instance Generation

Alessandro Fontanella, Petru-Daniel Tudosiu, Yongxin Yang, Shifeng Zhang, Sarah Parisot

Introduction

Modern text-to-image diffusion models, such as Stable Diffusion, have achieved remarkable success in generating high-fidelity visuals. However, these models often struggle with precise control over complex scenes. A common failure mode is attribute leakage, where properties of one object (e.g., color) bleed into another (e.g., a "blue apple next to a red bus" resulting in a red apple). Furthermore, standard models treat images as flat grids of pixels, making it difficult to manage spatial relationships or perform post-generation edits without regenerating the entire scene.

To address these limitations, this research introduces a multi-stage "generate-then-compose" framework. By shifting the paradigm from monolithic generation to the creation and assembly of individual RGBA (color + transparency) instances, the proposed method offers unprecedented control over object attributes, layout, and scene composition.

The RGBA Generation Framework

The core of this approach is a two-stage pipeline that treats a scene as a collection of independent, layered objects rather than a single static image.

1. RGBA Instance Generation

Instead of generating a full background and foreground simultaneously, the model is fine-tuned to produce isolated objects with a native alpha channel. This stage involves two key technical innovations:

  • Disentangled Latent Space: Standard Variational Autoencoders (VAEs) often "tangle" color and transparency data, leading to artifacts when objects are extracted. The authors implemented a training strategy that explicitly separates RGB and Alpha channels within the latent space, ensuring that object edges remain crisp and colors do not bleed into the transparent background.
  • Mutual Conditioning: During the denoising process, the model predicts RGB and Alpha channels sequentially. This allows the transparency mask to inform the object's shape and the color information to refine the edges, resulting in superior alignment between the object and its boundaries.

2. Multi-Layer Noise Blending

Once individual instances are generated, they must be integrated into a cohesive scene. The framework utilizes an Iterative Composition strategy:

  • Layer-by-Layer Integration: Rather than flattening all layers at once, the method integrates instances one by one. This naturally handles 3D occlusion, as the model can better understand which object sits in front of another.
  • Noise Inversion: To ensure the objects look like they belong in the final scene (e.g., adjusting for global lighting), the researchers use DDIM inversion. This process converts pre-generated objects back into a noise representation that matches the scene's global noise. The model then "re-denoises" the objects into the background, allowing for subtle adjustments in lighting and shadows while preserving the object's original identity.

Experimental Evaluation

The model was trained on the MuLAn dataset, which contains over 87,000 RGBA decompositions, supplemented by specialized matting datasets (AIM-500, HIM-2k, and PPM-100) to ensure high-quality transparency masks.

Quantitative Results

The proposed method significantly outperformed existing state-of-the-art (SOTA) baselines across several metrics:

  • Image Quality: The model achieved a Kernel Inception Distance (KID) of 0.0150, nearly three times better than the leading transparent generation method, LayerDiffusion (0.0772).
  • Mask Accuracy: It reached an Intersection over Union (IoU) of 0.892, demonstrating extremely precise object boundaries compared to traditional post-hoc matting techniques.
  • Text Alignment: CLIP scores confirmed that the model maintains high fidelity to complex text prompts, successfully avoiding the attribute leakage common in "one-shot" models like GLIGEN or MultiDiffusion.

Discussion and Future Work

The primary advantage of this framework is its intrinsic editability. Because objects are generated as independent RGBA files, users can move, rescale, or replace specific elements within a scene without affecting the rest of the image. This level of granular control is a significant step forward for creative workflows.

However, some challenges remain. Because instances are generated independently, they may occasionally lack perfect lighting consistency with the final background. Additionally, the iterative blending process is more computationally intensive than single-pass generation. Future research will focus on "conditioned" RGBA generation, where objects are generated with an awareness of the target background's lighting and reflections to further enhance realism.

Conclusion

By decomposing scene generation into the creation and blending of RGBA instances, this research provides a robust solution to the long-standing problems of attribute leakage and spatial control in diffusion models. The "generate-then-compose" paradigm not only improves image quality but also unlocks new possibilities for interactive and layered image editing.

Summary updated

BibTeX
@inproceedings{fontanella2024generating,
  author = {Alessandro Fontanella and Petru-Daniel Tudosiu and Yongxin Yang and Shifeng Zhang and Sarah Parisot},
  title = {{Generating compositional scenes via Text-to-image RGBA Instance Generation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=MwFeh4RqvA},
}
Figure