AMO Sampler: Enhancing Text Rendering with Overshooting
Xixi Hu, Keyang Xu, Bo Liu, Qiang Liu, Hongliang Fei
TL;DR
AMO introduces a training-free overshooting sampler for Rectified Flow models to improve text rendering in text-to-image generation. By alternating over-simulation of the learned ODE with noise injection and integrating an attention-guided per-patch modulation, AMO effectively implements a Langevin dynamics correction that reduces text misspellings without increasing inference cost. Empirical results show substantial gains in text accuracy (e.g., 32.3% for SD3 and 35.9% for Flux in text rendering) and human OCR-based performance improvements across multiple RF-based T2I models, while maintaining or improving overall image quality. The approach is lightweight, model-agnostic, and readily adoptable for existing RF-based T2I pipelines, offering a practical path to sharper, more faithful text in generated images.
Abstract
Achieving precise alignment between textual instructions and generated images in text-to-image generation is a significant challenge, particularly in rendering written text within images. Sate-of-the-art models like Stable Diffusion 3 (SD3), Flux, and AuraFlow still struggle with accurate text depiction, resulting in misspelled or inconsistent text. We introduce a training-free method with minimal computational overhead that significantly enhances text rendering quality. Specifically, we introduce an overshooting sampler for pretrained rectified flow (RF) models, by alternating between over-simulating the learned ordinary differential equation (ODE) and reintroducing noise. Compared to the Euler sampler, the overshooting sampler effectively introduces an extra Langevin dynamics term that can help correct the compounding error from successive Euler steps and therefore improve the text rendering. However, when the overshooting strength is high, we observe over-smoothing artifacts on the generated images. To address this issue, we propose an Attention Modulated Overshooting sampler (AMO), which adaptively controls the strength of overshooting for each image patch according to their attention score with the text content. AMO demonstrates a 32.3% and 35.9% improvement in text rendering accuracy on SD3 and Flux without compromising overall image quality or increasing inference cost. Code available at: https://github.com/hxixixh/amo-release.
