Interleaving Reasoning Generation

January 26, 2026 · View on GitHub

The official repo for "Interleaving Reasoning for Better Text-to-Image Generation".

🤗 IRG   |   🤗 IRG-Toy-Dataset   |   📑 Paper  

The datasets, code and weights will be released, stay tuned!

Performance

ModelGenEvalWISETIIF-short/long (Qwen)GenAI-BenchOneIG-EN
Janus-Pro-7B0.800.3565.38/61.100.750.267
FLUX.1-dev0.82*0.5066.24/66.720.760.434
Show-o20.760.6162.80/63.870.750.308
BAGEL0.780.5270.97/71.790.790.361
BAGEL w/ self-CoT0.790.7068.06/68.780.810.324
IRG (Ours)0.850.7776.00/73.770.840.415

*: Using the rewrited prompts to evaluation.

Timeline

Overview

As shown in (a), we illustrate an example of Interleaving Reasoning Generation (IRG). Given a prompt, the model first produces a text‑based reasoning process and then generates an image conditioned on that reasoning. Next, building upon the initial image, the model reflects on how to improve its quality and produces a refined image through this reflection process. IRG can substantially enhance image generation quality. For instance, in the top case of (a), IRG improves upon the previous generated image via multi‑turn reasoning, enhancing rendering textures, shadow realism, and other visual properties. In the bottom case of (a), IRG significantly improves fine‑grained details, such as the delicate structures of fingers—highlighted within the red box (as detailed in (b)). As shown in (c), compared to current SoTA models, our proposed IRG achieves clearly superior performance across multiple mainstream T2I benchmarks.

IRG Case

Case Comparison

Pipeline

Overview of our proposed IRG training and inference pipeline. IRG learns the text-based thinking process and the complete high-quality image generation pipeline under six decomposed learning modes. During inference, we introduce a dedicated CFG condition design for IRG’s improved image generation steps.

Quickstart

Environment

  1. Clone this repository and navigate to IRG folder
git clone https://github.com/Osilly/Interleaving-Reasoning-Generation.git
cd Interleaving-Reasoning-Generation
  1. Install Package
pip install -e .
pip install flash-attn --no-build-isolation

Inference

SFT Training

Please refer to SFT/README.md.

Evalution

Please refer to eval/README.md.

Acknowledgements

Thanks for the wonderful works of BAGEL!