NextFlow: Unified Sequential Modeling Activates Multimodal Understanding and Generation

Huichao Zhang, Liao Qu, Yiheng Liu, Hang Chen, Yangyang Song, Yongsheng Dong, Shikun Sun, Xian Li, Xu Wang, Yi Jiang, Ye Hu, Bo Chen, Yiming Gao, Peng Liu, Akide Liu, Zhipeng Yang, Qili Deng, Linjie Xing, Jiyang Liu, Zhao Wang, Yang Zhou, Mingcong Liu, Yi Zhang, Qian He, Xiwei Hu, Zhongqi Qi, Jie Shao, Zhiye Fu, Shuai Wang, Fangmin Chen, Xuezhi Chai, Zhihua Wu, Yitong Wang, Zehuan Yuan, Daniel K. Du, Xinglong Wu

Abstract: We present NextFlow, a unified decoder-only autoregressive transformer trained on 6 trillion interleaved text-image discrete tokens. By leveraging a unified vision representation within a unified autoregressive architecture, NextFlow natively activates multimodal understanding and generation capabilities, unlocking abilities of image editing, interleaved content and video generation. Motivated by the distinct nature of modalities - where text is strictly sequential and images are inherently hierarchical - we retain next-token prediction for text but adopt next-scale prediction for visual generation. This departs from traditional raster-scan methods, enabling the generation of 1024x1024 images in just 5 seconds - orders of magnitude faster than comparable AR models. We address the instabilities of multi-scale generation through a robust training recipe. Furthermore, we introduce a prefix-tuning strategy for reinforcement learning. Experiments demonstrate that NextFlow achieves state-of-the-art performance among unified models and rivals specialized diffusion baselines in visual quality.

Introduction

For years, the artificial intelligence landscape has been bifurcated: Large Language Models (LLMs) excel at logical reasoning and sequential processing but struggle with high-fidelity visual synthesis, while Diffusion Models produce stunning imagery but lack inherent semantic reasoning. Previous attempts to unify these domains via Autoregressive (AR) modeling—treating images as flattened sequences of tokens—encountered a significant bottleneck. Because image token sequences grow quadratically with resolution, generating a high-resolution image using standard "raster-scan" methods could take upwards of ten minutes.

Furthermore, traditional image tokenizers often prioritize pixel-perfect reconstruction at the expense of high-level semantics. This creates a "semantic gap" that hinders a model's ability to truly understand the content it generates or perceives. NextFlow addresses both the efficiency and semantic alignment challenges within a single, unified 7B parameter architecture.

Methods: Hierarchical Unified Modeling

NextFlow is built upon a Qwen2.5-VL-7B backbone, enhanced with several structural innovations designed to bridge the gap between text and vision.

The NextFlow unified architecture utilizes a decoder-only transformer to process interleaved text and image tokens, feeding into specialized decoders for multimodal output.

Next-Scale Prediction

Departing from the slow raster-scan approach, NextFlow predicts entire "scales" of an image hierarchically, moving from coarse 2x2 layouts to fine-grained 64x64 details. This approach acknowledges that while text is strictly sequential, images are inherently hierarchical. By predicting scales rather than individual pixels in a line, the model drastically reduces the number of sampling steps required for high-resolution output.

Dual-Codebook Tokenizer and 3D RoPE

The system utilizes a "TokenFlow" style tokenizer that decouples semantic features (for understanding) from pixel-level features (for generation). This ensures that discrete tokens carry sufficient conceptual weight for the LLM to reason about them. To manage interleaved data, the authors introduced Multiscale 3D Rotary Positional Embeddings (RoPE), which account for spatial coordinates and scale indices simultaneously.

Prefix-Tuning and Loss Reweighting

To stabilize training, the authors adapted Group Reward Policy Optimization (GRPO) for reinforcement learning, focusing updates on "coarse-scale prefixes." Since the initial coarse layout determines the overall success of the image, optimizing these structural decisions is critical. Additionally, a scale-aware loss reweighting strategy prioritizes these foundational scales, preventing the model from over-focusing on fine-grained textures at the expense of composition.

Datasets and Benchmarks

NextFlow was pre-trained on a massive corpus of 6 trillion tokens, including interleaved video-to-text sequences, document-rich images, and standard vision-language datasets like LAION and Megalith. To maintain linguistic performance, pure text and mathematical reasoning data were also included.

To rigorously evaluate image editing, the authors introduced EditCanvas, a new benchmark containing 5,221 high-quality samples across 56 fine-grained tasks. This benchmark distinguishes between "Traditional Editing" (modifying existing pixels) and "Subject-Driven Generation" (creating new scenes around a specific object).

Key Results

NextFlow demonstrates that a unified model can match or exceed the performance of specialized baselines across multiple dimensions:

  • Efficiency: The model generates 1024×1024 images in approximately 5 seconds, requiring 6× fewer FLOPs than MMDiT-based diffusion models at equivalent resolutions.
  • Visual Fidelity: NextFlow achieved a 0.84 on GenEval and 88.32 on DPG, rivaling top-tier diffusion models like FLUX.1-dev in prompt adherence and aesthetic quality.
  • Editing and Reasoning: On the EditCanvas benchmark, NextFlow-RL achieved a score of 8.04, outperforming specialized models like Emu3.5. Because it remains a true LLM, it can perform Chain-of-Thought (CoT) reasoning to "plan" an image, resolving cultural or physical ambiguities before the first pixel is drawn.
NextFlow demonstrates high-fidelity generation across diverse styles, including complex text rendering, Lego-style architecture, and creative character design.

Conclusion and Future Work

NextFlow proves that hierarchical autoregressive modeling is a viable path toward unifying understanding and generation. While the 7B parameter model is highly capable, the authors note a capacity bottleneck when squeezing world-class performance in both domains into a single dense model. Future iterations may explore Mixture-of-Experts (MoE) architectures to scale capacity and further investigate higher token compression rates for ultra-high-resolution tasks.

Summary updated

BibTeX
@misc{zhang2026nextflow,
  author = {Huichao Zhang and Liao Qu and Yiheng Liu and Hang Chen and Yangyang Song and Yongsheng Dong and Shikun Sun and Xian Li and Xu Wang and Yi Jiang and Ye Hu and Bo Chen and Yiming Gao and Peng Liu and Akide Liu and Zhipeng Yang and Qili Deng and Linjie Xing and Jiyang Liu and Zhao Wang and Yang Zhou and Mingcong Liu and Yi Zhang and Qian He and Xiwei Hu and Zhongqi Qi and Jie Shao and Zhiye Fu and Shuai Wang and Fangmin Chen and Xuezhi Chai and Zhihua Wu and Yitong Wang and Zehuan Yuan and Daniel K. Du and Xinglong Wu},
  title = {{NextFlow: Unified Sequential Modeling Activates Multimodal Understanding and Generation}},
  year = {2026},
  eprint = {2601.02204},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2601.02204},
}
Figure