TL;DR
TextAlign is a non-invasive, post-training preference-alignment framework that significantly improves text rendering in text-to-image foundation models without altering their underlying architecture. By utilizing a hierarchical vision-language model (VLM) reward system that evaluates text at the global, word, and glyph levels, it successfully guides models like FLUX and SD3.5 to generate highly accurate, legible text while fully preserving general image quality.
What Problem Does This Paper Address?
While modern text-to-image models generate breathtaking imagery, getting them to correctly spell words inside those images remains a notorious challenge. Generating text requires a model to handle discrete symbolic constraints (spelling, character order) simultaneously with continuous visual structures (font style, layout, background integration).
To fix this, previous methods typically rely on heavy architectural interventions, such as adding specialized text encoders, auxiliary glyph control modules (like ControlNet), or character-level segmentation masks. However, these solutions are tightly coupled to specific model architectures, require complex engineering to port to new models, and risk damaging the rich generative priors of the original foundation model.
TextAlign addresses this by asking a simpler question: Can we fix text rendering purely through post-training preference alignment, leaving the base generator completely frozen?
Methods
The authors treat text rendering as a post-training preference-alignment problem, making it entirely model-agnostic. The core innovation is the TextAlign Reward Design, which breaks down text evaluation into a three-level hierarchy judged by a frozen VLM (Qwen3.5-9B):
- Global Level: Evaluates macro-features via two binary indicators—whether any readable text exists (
b_no_text) and whether the contours/strokes are severely distorted (b_misshape). - Word Level: Captures semantic-level errors by checking for dropped (
b_drop_word), added (b_add_word), or substituted (b_replace_word) whole words. - Glyph Level: Targets fine-grained character precision, tracking character-level deletions, insertions, and substitutions within words.
These 8 binary indicators are aggregated into a single scalar reward representing the fraction of defect-free metrics. This unified reward signal is highly flexible and directly supports both Group Relative Policy Optimization (GRPO) and Direct Preference Optimization (DPO) pipelines.
Datasets
To rigorously evaluate text rendering under realistic conditions, the authors constructed a new discriminative benchmark spanning ten distinct visual categories (including posters, advertisements, handwriting, logos, and natural scenes). Unlike older benchmarks that favor short, centered text, this dataset varies text length, layout complexity, and spatial positioning.
For out-of-domain validation, the authors evaluated their framework on two external benchmarks:
- MARIO-Eval: A standard text-rendering evaluation split.
- LongText-Bench: A challenging benchmark specifically designed for long-text rendering in both English and Chinese.
Key Insights and Ideas
- Typographic Skill is Latent: The paper demonstrates that foundation models already possess the underlying capability to render clean text; they simply lack the alignment to prioritize typographic accuracy over generic texture generation.
- Decomposition Prevents Reward Noise: Standard OCR metrics (like edit distance) fail to capture visual deformations, while simple binary text-presence rewards miss fine-grained spelling errors. Decomposing the reward into a structured hierarchy prevents these blind spots and stabilizes training.
- Zero Architectural Overhead: Because alignment happens post-training via a reward signal, the resulting model requires zero extra modules or specialized samplers during inference, maintaining the original model's speed and efficiency.
Key Results
The authors tested TextAlign on SD3.5-Medium, FLUX.1-dev, and Z-Image-Turbo (a distilled few-step model), comparing it against strong baselines like AnyText and TextDiffuser.
- Typographic Accuracy Boost: On the strong Z-Image-Turbo backbone, GRPO alignment achieved the highest scores across all OCR metrics, boosting the Normalized Edit Score (NED) from 0.8739 to 0.8893 and exact word-set accuracy from 0.5278 to 0.5648. On FLUX, NED improved from 0.5768 to 0.6075.
- Preserved Image Quality: General generation quality metrics (CLIPScore, ImageReward, HPSv3) remained highly competitive, proving that the model doesn't sacrifice artistic capability to achieve better spelling.
- Human Preference: In a user study evaluating text fidelity and visual integration, human judges consistently preferred the TextAlign-aligned variants over the base models and architecture-level baselines.
Limitations and Future Work
- VLM Judge Dependency: The framework relies heavily on the structured output of a VLM judge. If the VLM fails to parse a complex image correctly, that sample must be discarded, which can lower data efficiency during training.
- Complex Layout Vulnerability: While performance improved across the board, categories with highly complex layouts or heavy background clutter (such as "academic" and "scene") still show lower exact-match accuracy compared to simpler layouts like posters.
- Future Directions: The authors suggest exploring how this hierarchical reward framework scales to even larger foundation models and more diverse, multilingual long-text generation tasks.
Summary updated