DiffX: Guide Your Layout to Cross-Modal Generative Modeling

Zeyu Wang, Jingyu Lin, Yifei Qian, Yi Huang, Shicen Tian, Bosong Chai, Juncan Deng, Qu Yang, Lan Du, Cunjian Chen, Yufei Guo, Kejie Huang · DOI · OpenReview

TL;DR

This paper introduces DiffX, a novel diffusion model for generating cross-modal images (like RGB + thermal or depth) guided by both layout and text. DiffX achieves this by performing diffusion in a shared latent space, enabling coherent generation of multiple image modalities simultaneously.

What Problem Does This Paper Address?

Human perception of the world is inherently multi-modal, incorporating information beyond visible light, such as thermal and depth data. While diffusion models have excelled at generating RGB images from text and layouts, generating aligned cross-modal image pairs (e.g., RGB and thermal images of the same scene) has been challenging. Existing methods often generate modalities separately, leading to misalignments. Furthermore, acquiring and annotating large, pixel-aligned cross-modal datasets is difficult and time-consuming. This paper aims to bridge this gap by proposing a unified framework for layout-guided cross-modal image generation that produces coherent, multi-modal outputs.

Methods

DiffX is built upon the Latent Diffusion Model (LDM) framework but introduces several key innovations:

  • Modality-Shared Latent Space: The core idea is to perform the diffusion and denoising processes in a shared latent space. This allows the model to learn joint representations of different modalities, leading to better alignment.
  • Multi-Path Variational Autoencoder (MP-VAE): Instead of a standard VAE, DiffX uses an MP-VAE with separate encoders for different modalities and parallel decoders to reconstruct them. This MP-VAE is enhanced with a Laplacian Pyramid to better capture high-frequency details often present in thermal and depth images.
  • Joint-Modality Embedder (JME): To effectively integrate layout and text conditions, DiffX introduces the JME. This module uses a gated cross-attention mechanism to fuse layout information (from bounding boxes or semantic masks) with long text captions, creating a rich conditional representation.
  • DiffX-UNet: The denoising network is a UNet architecture adapted to incorporate the fused conditional information from the JME. It leverages pre-trained weights from Stable Diffusion for efficiency.

Datasets

The authors utilized existing datasets and also constructed new ones:

  • Existing Datasets: FLIR, MFNet, COME15K, and MCXFace.
  • New Dataset Construction: To address the scarcity of annotated cross-modal data, the authors employed a human-in-the-loop approach. They used Large Multimodal Models (LMMs) like LLaVA for initial caption generation, followed by manual refinement and GPT-4 for complex corrections. For tasks requiring additional modalities (like depth), they used pre-trained models (e.g., Marigold) to translate existing data.

Key Insights and Ideas

  • Shared Latent Space is Key for Alignment: Performing diffusion in a modality-shared latent space is crucial for generating aligned cross-modal image pairs, overcoming the limitations of separate generation processes.
  • JME for Richer Conditioning: The Joint-Modality Embedder effectively combines layout and long text descriptions, providing a more comprehensive guidance for generation. This is particularly important for complex scenes and detailed image descriptions.
  • LMMs and Human-in-the-Loop for Data Augmentation: Leveraging LMMs and human feedback is an effective strategy for creating high-quality, annotated cross-modal datasets, which are essential for training such models.
  • Adaptability to Diverse Modalities: DiffX demonstrates a strong ability to adapt to generating not just RGB+X but also RGB+X+Y(+Z) and other combinations, showcasing its versatility.

Key Results

  • Robust Cross-Modal Generation: DiffX achieves state-of-the-art results in generating aligned "RGB+X" image pairs across various layout conditions and datasets (FLIR, MFNet, COME15K).
  • Superior Quantitative Metrics: DiffX outperforms baseline models in LPIPS and FID scores, indicating higher quality and better alignment of generated images. For example, on the Canny → RGB+D task, DiffX achieved FID scores of 17.11/31.20 for RGB/X generation, significantly better than baselines.
  • Effective Multi-Modal Generation: The model shows strong potential for generating "RGB+X+Y(+Z)" and other diverse modalities, as demonstrated on COME15K and MCXFace datasets.
  • Improved Consistency: Qualitative results show that DiffX generates more consistent and realistic cross-modal image pairs compared to modified baseline models.
  • Ablation Studies Confirm Effectiveness: Experiments confirm the importance of the modality-shared latent space, JME, and the Laplacian Pyramid in the MP-VAE for achieving high-quality cross-modal generation.

Limitations and Future Work

  • Data Scarcity: A major limitation is the reliance on high-quality, pixel-aligned cross-modal datasets, which are still scarce. Existing datasets often have limited scene diversity and generalization capabilities.
  • Generalization Challenges: Datasets like FLIR and MFNet are primarily road-scene focused, which can limit the model's generalization to other contexts (e.g., indoor or industrial environments).
  • Future Work:
    • Expand dataset scope and modality diversity for more robust and generalized cross-modal generation.
  • Develop multi-to-multiple generative modeling for unrestricted modality combinations.
  • Integrate additional information, such as viewing angle for RGB+D generation, to produce 3D content.
  • Explore robust cross-modal audio-video encoding for generating corresponding audio and video content.

Summary updated

BibTeX
@misc{wang2024diffx,
  author = {Zeyu Wang and Jingyu Lin and Yifei Qian and Yi Huang and Shicen Tian and Bosong Chai and Juncan Deng and Qu Yang and Lan Du and Cunjian Chen and Yufei Guo and Kejie Huang},
  title = {{DiffX: Guide Your Layout to Cross-Modal Generative Modeling}},
  year = {2024},
  eprint = {2407.15488},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.15488},
}
Figure