Organizations: Shanghai Jiao Tong University · Xiaohongshu Inc. · Hong Kong University of Science and Technology · Southeast University · South China University of Technology
Despite recent advances in generative models driving significant progress in text rendering, accurately generating complex text and mathematical formulas remains a formidable challenge. This difficulty primarily stems from the limited instruction-following capabilities of current models when encountering out-of-distribution prompts. To address this, we introduce GlyphBanana, alongside a corresponding benchmark specifically designed for rendering complex characters and formulas. GlyphBanana employs an agentic workflow that integrates auxiliary tools to inject glyph templates into both the latent space and attention maps, facilitating the iterative refinement of generated images. Notably, our training-free approach can be seamlessly applied to various Text-to-Image (T2I) models, achieving superior precision compared to existing baselines. Extensive experiments demonstrate the effectiveness of our proposed workflow. Associated code is publicly available at https://github.com/yuriYanZeXuan/GlyphBanana.
Figures & tables
Figure 2: The illustration of motivation. We observe that while in-distribution cases show satisfying precision-style banlance, there exists huge gap between OOD cases and deterministic rendered texts.
Figure 3: Overview of the GlyphBanana agentic pipeline. The workflow comprises four stages: (1) Extraction Stage parses the input into text content and style attributes; (2) Draft Preview Stage generates an initial image via a Layout Planner; (3) Glyph Injection Stage applies Frequency Decomposition in latent space and Attention Re-weighting inside each DiT block; (4) Style Refinement Stage employs iterative refinement with a Style Refiner and Score Judger. The bottom panel details the denoising process with the Attention Re-weighting.
Figure 4: Illustration of the GlyphBanana-Benchmark with auxiliary tools. The proposed benchmark consists of two categories. General Text for Rendering assesses standard and stylized text rendering. Formulas from Easy to Complex evaluates formula rendering across varying complexities
Datasets
Text Type
Condition
Statistics
OCR Score
Style Score
En.
Zh.
Formulas
Image
Mask
Num.
Avg.L
DrawTextExt [ 24 ]
✓
✓
✗
✗
✗
220
17.0
0.76
0.81
0.83
0.80
AnyText [ 51 ]
✓
✓
✗
✗
✗
1000
21.8
0.33
0.44
0.67
0.69
CVTG-2K [ 48 ]
✓
✗
✗
✗
✗
2000
39.5
0.49
0.51
0.75
0.67
LongText-Bench [ 7 ]
✓
✓
✗
✗
✗
320
116.7
0.38
0.72
0.69
0.74
Ours
✓
✓
✓
✓
✓
290
32.7
0.37
0.71
0.68
0.71
Table 1: Comparison of different text-rendering datasets. Num. refers to the number of samples in the dataset, and Avg.L refers to the average length of the char to be rendered in the dataset. refers to FLUX.2-klein-9B and refers to Qwen-Image-2512.
Figure 5: Qualitative comparisons with other baselines . Fail denotes the FLUX.1-dev based models unable to follow instructions to render chinese text due to its limited text-encoder. Besides, we color the quoted text in red, referring to the target text to be rendered, and color the style text related to the glyph in blue.
Method
OCR Score ↑
VLM Score ↑
ITM Score ↑
User Study ↓
Acc.
Ned.
Style
Faith.
VQA
CLIP
Aesthetic
Faith.
Ours+Z−Image
w/o re-weight
72.3
76.7
0.745
0.704
0.808
0.709
2.73
2.70
w/o refine
84.0
86.7
0.725
0.745
0.798
0.710
3.47
3.40
w/o F.D.
84.5
87.3
0.755
0.764
0.803
0.708
2.73
2.83
full
85.9
88.1
0.765
0.764
0.814
0.720
1.07
1.07
Ours+QwenImage
w/o re-weight
70.7
74.8
0.676
0.689
0.814
0.680
2.43
2.23
Table 2: Quantitative comparison results for text-rendering metrics.
Method
OCR Score ↑
VLM Score ↑
ITM Score ↑
User Study ↓
Acc.
Ned.
Style
Faith.
VQA
CLIP
Aesthetic
Faith.
AnyText2
33.8
40.5
0.661
0.438
0.641
0.637
7.80
7.62
TextCrafter
34.0
39.6
0.672
0.371
0.804
0.680
6.75
6.47
Flux.1
.dev
27.9
34.3
0.691
0.280
0.771
0.639
6.75
7.03
FluxText
25.0
28.4
0.600
0.351
0.718
0.656
6.98
6.83
Flux.2
.klein
36.7
42.1
0.676
0.521
0.821
0.686
6.38
6.08
Table 3: Quantitative comparison results for text-rendering metrics. represents for FLUX.2-klein-9B and represents for Qwen-Image-2512.
Figure 6: Qualitative comparison results.
Figure 7: Metric comparisons for multi-turn refinement.
Figure 8: Qualitative comparisons for illustrating methods of Frequency Decomposition.
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 9: More qualitative results for refinement process.
Figure 10: More qualitative results for GlyphBanana, Qwen-Image as base model.
Figure 11: More qualitative results for GlyphBanana, Z-Image as base model.
Subset
Num.
Avg.∣Text∣
Avg.∣Prompt∣
English Subsets
GlyphBanana-En (Easy)
50
4.08
47.74
GlyphBanana-En (Rare)
25
8.92
56.84
Chinese Subsets
GlyphBanana-Zh (Easy)
50
2.00
19.00
GlyphBanana-Zh (Rare)
25
11.20
27.48
Appendix
Table 4: Illustration of GlyphBanana-Benchmark. The benchmark contains multimodal inputs spanning English, Chinese, and scientific-formula subsets, together with reference images and masks, and follows a ladder-shaped difficulty design. Avg.∣Text∣ denotes the average length of the target rendered text, and Avg.∣Prompt∣ denotes the average length of the corresponding prompt.
Configuration
Mean IoU ↑
Median IoU ↑
Std ↓
Improvement
VLM only)
0.2703
0.2508
0.1620
–
VLM + 3 × 3 Grid
0.4475
0.3892
0.1464
+65.6%
VLM + 5 × 5 Grid
0.5531
0.5406
0.1280
+104.6%
VLM + 8 × 8 Grid
0.3776
0.3628
0.1552
+39.7%
Appendix
Table 5: Ablation Study on VLM-Based Text Grounding with Auxiliary Tools.
Figure 12: Execution flow of the formula-rendering auxiliary tool used by GlyphBanana. The implementation prefers MathJax for rich LaTeX formulas, falls back to matplotlib mathtext when Node.js or SVG conversion is unavailable, and uses PIL-based text rendering for non-LaTeX content.
Figure 13: Schematic diagram of enhanced text rendering by injecting glyph templates in latent space.
Faithful text rendering remains a persistent weakness of large text-to-image generative models, as it requires both semantic instruction following and fine-grained glyph-level structure. Prior methods often improve this ability through architecture-specific modules or encoder modifications, which complicate deployment across foundation models. We study text rendering as a post-training preference-alignment problem and propose TextAlign, a non-invasive framework that keeps the generator architecture unchanged. The key component is a hierarchical vision-language model (VLM)-based reward that decomposes rendering errors into global, word, and glyph levels, then converts binary defect judgments into a scalar preference signal. The resulting signal supports both Group Relative Policy Optimization (GRPO) and Direct Preference Optimization (DPO). Experiments on FLUX.1-dev and Z-Image-Turbo show consistent gains in OCR-based text accuracy without degrading general generation quality. Compared with strong foundation and text-rendering baselines, including SD3.5, Qwen-Image, AnyText, and TextDiffuser, these results indicate that reward design offers a scalable alternative to model redesign for improving text rendering.
Mingxuan Cui, Jingpu Yang, Fengxian Ji +7
Mohamed bin Zayed University of Artificial Intelligence · Chinese Academy of Sciences Institute of Automation · Northeastern University +1
Post-training is crucial for improving text-to-image models, yet existing pipelines typically rely on manually curated training data and fixed training distributions. We introduce APT (Agentic Post-Training), a fully automated framework that adaptively post-trains a base model according to its evolving capability profile. APT coordinates three agents to construct evaluation sets from user requirements, diagnose model-specific strengths and failure modes, and generate reinforcement learning data with an adaptive prompt distribution that emphasizes underperforming capabilities. By repeatedly evaluating, diagnosing, and updating the generator, APT lets the current model's behavior shape its next training tasks, forming a feedback loop inspired by recursive self-improvement. For general-purpose settings without user-specified evaluation scenarios, we further develop an evaluation harness that enables broad and diverse evaluation set generation. Experiments across multiple base models, benchmarks, and generation architectures demonstrate that APT is model-agnostic, benchmark-agnostic, architecture-agnostic, and fully automated.
Sirui Zhang, Fangyun Wei, Dong Chen +5
University of Science and Technology of China · Microsoft Research Asia · University of Sydney +2
Recent text-to-image models can generate high-quality images from natural-language prompts, yet controlling typography remains challenging: requested typographic appearance is often ignored or only weakly followed. We address this limitation with a data-centric approach that trains image generation models using targeted supervision derived from a structured annotation pipeline specialized for typography. Our pipeline constructs a large-scale typography-focused dataset, FontUse, consisting of about 70K images annotated with user-friendly prompts, text-region locations, and OCR-recognized strings. The annotations are automatically produced using segmentation models and multimodal large language models (MLLMs). The prompts explicitly combine font styles (e.g., serif, script, elegant) and use cases (e.g., wedding invitations, coffee-shop menus), enabling intuitive specification even for novice users. Fine-tuning existing generators with these annotations allows them to consistently interpret style and use-case conditions as textual prompts without architectural modification. For evaluation, we introduce a Long-CLIP-based metric that measures alignment between generated typography and requested attributes. Experiments across diverse prompts and layouts show that models trained with our pipeline produce text renderings more consistent with prompts than competitive baselines. The source code for our annotation pipeline is available at https://github.com/xiaxinz/FontUSE.