Skip to main content
QUICK REVIEW

[Paper Review] Dimba: Transformer-Mamba Diffusion Models

Zhengcong Fei, Mingyuan Fan|arXiv (Cornell University)|Jun 3, 2024
Vibration and Dynamic AnalysisEngineering6 citations
TL;DR

Dimba introduces a hybrid diffusion model that stacks Transformer and Mamba layers with cross-attention for text-to-image generation, achieving competitive quality with reduced memory and flexible throughput. It also explores dataset construction, quality tuning, and resolution adaptation for efficient large-scale generation.

ABSTRACT

This paper unveils Dimba, a new text-to-image diffusion model that employs a distinctive hybrid architecture combining Transformer and Mamba elements. Specifically, Dimba sequentially stacked blocks alternate between Transformer and Mamba layers, and integrate conditional information through the cross-attention layer, thus capitalizing on the advantages of both architectural paradigms. We investigate several optimization strategies, including quality tuning, resolution adaption, and identify critical configurations necessary for large-scale image generation. The model's flexible design supports scenarios that cater to specific resource constraints and objectives. When scaled appropriately, Dimba offers substantial throughput and a reduced memory footprint relative to conventional pure Transformers-based benchmarks. Extensive experiments indicate that Dimba achieves comparable performance compared with benchmarks in terms of image quality, artistic rendering, and semantic control. We also report several intriguing properties of architecture discovered during evaluation and release checkpoints in experiments. Our findings emphasize the promise of large-scale hybrid Transformer-Mamba architectures in the foundational stage of diffusion models, suggesting a bright future for text-to-image generation.

Motivation & Objective

  • Motivate hybrid attention–state-space architecture to balance memory and throughput in diffusion models.
  • Develop Dimba, a diffusion backbone that alternates Transformer and Mamba layers with cross-attention for conditioning.
  • Curate high-quality, aesthetically focused image-text data and apply quality tuning and resolution adaptation.
  • Demonstrate that Dimba achieves competitive image quality and semantic control with reduced resource use.

Proposed method

  • Deploy a Dimba block that interleaves Transformer and Mamba layers with an attention cross-link for conditioning.
  • Use a global shared MLP for time-step information and AdaLN layers for stabilization.
  • Train on a large internal dataset filtered for aesthetics and semantically dense captions using auto-labeled shares (Share-Captioner) and LAION aesthetics predictor.
  • Apply quality tuning by fine-tuning on high-quality data with small batch sizes and early stopping to avoid overfitting.
  • Investigate resolution scaling with PE interpolation to enable high-resolution outputs without training from scratch.
  • Evaluate with FID on COCO zero-shot, T2I-CompBench alignment, and human/AI preference studies.

Experimental results

Research questions

  • RQ1How does a hybrid Transformer–Mamba architecture affect memory usage and throughput in diffusion models?
  • RQ2Can cross-attention effectively condition a mixed-architecture backbone for text-to-image generation?
  • RQ3What data curation and training strategies best balance image quality, semantic alignment, and efficiency?
  • RQ4How does resolution adaptation interact with hybrid backbones to enable high-resolution generation?

Key findings

  • Dimba achieves FID-30K of 8.93 on COCO zero-shot with 11.2% of the training time and 2.0% of the training samples compared to selected baselines.
  • Dimba-G shows exemplary performance on T2I-CompBench in image-text alignment metrics (attribute binding, object relationships, and complex compositions).
  • Quality tuning and data curation with long captions improve aesthetic and semantic quality, while PE interpolation accelerates convergence for higher resolutions.
  • Dimba offers a flexible memory/throughput trade-off by adjusting the attention-to-Mamba ratio (K) and leveraging AdaLN for stability.
  • Compared to large pure-transformer baselines, Dimba uses roughly 2% of training resources while achieving comparable FID scores.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.