NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

FlowTok: Flowing Seamlessly Across Text and Image Tokens

Ju He, Qihang Yu, Qihao Liu, Liang-Chieh Chen

TL;DR

FlowTok introduces a novel framework that directly maps text and image tokens into a unified 1D latent space, enabling seamless cross-modal generation with significantly reduced computational costs and faster inference. This approach bypasses the need for complex conditioning mechanisms found in traditional diffusion models, offering a more efficient and scalable solution for text-to-image and image-to-text tasks.

What Problem Does This Paper Address?

Bridging the gap between different data modalities, particularly text and images, is a fundamental challenge in AI. While current text-to-image generation models often treat text as a conditioning signal to guide a complex denoising process (like diffusion models), this approach can be computationally intensive and require intricate mechanisms. The authors aim to simplify this by enabling direct, seamless transitions between text and image representations within a shared latent space, unifying both understanding and generation tasks. They specifically address the inherent differences in how text (semantic, 1D tokens) and images (spatially redundant, 2D embeddings) are represented, which makes creating a unified latent space challenging.

Methods

FlowTok's core innovation lies in its ability to project both text and images into a compact, unified 1D latent space. This is achieved through several key components:

  • 1D Visual Tokenization: Images are first processed by a Vision Transformer (ViT) encoder to extract compact 1D latent tokens. This approach, building on TA-TiTok, is enhanced with Rotary Positional Embeddings (RoPE) and SwiGLU FFNs for improved performance.
  • Text Tokenization and Projection: Pre-trained text embeddings from models like CLIP are projected into a low-dimensional latent space using a lightweight text projector. This ensures the text tokens match the dimensionality of the image tokens.
  • Flow Matching: The framework leverages flow matching, a generative technique that learns a direct path between distributions. By projecting both modalities into the same 1D latent space, FlowTok enables direct flow matching between text and image tokens, eliminating the need for complex conditioning or noise scheduling.
  • Unified Latent Space: The key is aligning the number of text and image tokens (e.g., 77 tokens) and their dimensions (e.g., 16 dimensions). This results in a significantly smaller latent space compared to traditional 2D approaches.
  • Text Alignment Loss: To ensure generated images accurately reflect the text descriptions, an auxiliary text alignment loss (inspired by CLIP) is introduced to preserve semantic consistency.

Datasets

  • Training: DataComp-1B, CC12M, LAION-aesthetic, LAION-art, LAION-pop, JourneyDB, and DALLE3-1M were used for text-to-image generation. COCO was used for image-to-text generation.
  • Evaluation: COCO and MJHQ-30K were used for text-to-image generation evaluation. COCO Karpathy split was used for image-to-text generation.

Key Insights and Ideas

  • Direct Flow is More Efficient: The paper demonstrates that directly mapping text and image tokens into a shared latent space for flow matching is significantly more efficient than using text as a conditioning signal for diffusion models.
  • 1D Tokens are Sufficient: By carefully designing the tokenization process, FlowTok shows that a compact 1D latent representation is sufficient for high-quality cross-modal generation, reducing the need for complex 2D spatial representations.
  • Minimalism Leads to Performance: The streamlined architecture, free from complex conditioning mechanisms and noise scheduling, not only reduces computational overhead but also leads to competitive or superior performance.
  • Unified Framework: The ability to handle both text-to-image and image-to-text generation within the same framework highlights the power of the unified latent space approach.

Key Results

  • Efficiency: FlowTok-XL achieves comparable FID scores to state-of-the-art models on COCO while requiring significantly fewer training resources (20.4 8-A100 days vs. 94.1 for PixArt-a). FlowTok-H achieves an FID of 7.15 on MJHQ-30K.
  • Speed: FlowTok offers over 10x faster inference speeds compared to models like Show-o and CrossFlow. FlowTok-XL generates 22.7 images/sec, and FlowTok-H generates 18.2 images/sec at 256px resolution.
  • Latent Space Compression: The 1D token representation achieves a 3.3x compression rate in latent size compared to typical 2D flow matching methods for 256-resolution images (77x16 vs. 32x32x4).
  • Image-to-Text Performance: FlowTok achieves competitive performance on image-to-text generation, with scores comparable to or exceeding other methods on the COCO dataset.

Limitations and Future Work

  • Ablation on Loss Weight: The authors found that setting the text alignment loss weight (γ₂) to 1.0 was sufficient, and increasing it further could hinder performance. This suggests a delicate balance is needed for optimal semantic preservation.
  • Reproducibility: The authors emphasize training exclusively on publicly available datasets to ensure reproducibility and democratize research.
  • Future Work: The paper suggests that their work establishes a strong foundation for future research in generalized cross-modality generation. The release of their code is intended to facilitate further advancements in this area.

Summary updated

BibTeX
@inproceedings{he2025flowtok,
  author = {Ju He and Qihang Yu and Qihao Liu and Liang-Chieh Chen},
  title = {{FlowTok: Flowing Seamlessly Across Text and Image Tokens}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2025},
}
Figure