TextFlux is an
OCR-free framework using a Diffusion Transformer (DiT, based on
FLUX.1-Fill-dev) for high-fidelity multilingual scene text synthesis. It simplifies the learning task by providing direct visual glyph guidance through spatial concatenation of rendered glyphs with the scene image, enabling the model to focus on contextual reasoning and visual fusion.
-
Clone/Download: Get the necessary code and model weights.
-
Dependencies:
1conda create -n textflux python==3.11.4 -y
2conda activate textflux
3pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
4
5pip install -r requirements.txt
6# Ensure diffusers >= 0.32.1
Provides "Normal Mode" (for pre-combined inputs) and "Custom Mode" (upload scene, draw masks, input text for automatic template generation and concatenation).
Our code is modified based on
Diffusers. We adopt
black-forest-labs/FLUX.1-Fill-dev as the base model. Thanks to all the contributors for the helpful discussions!
1@misc{xie2025textfluxocrfreeditmodel,
2 title={TextFlux: An OCR-Free DiT Model for High-Fidelity Multilingual Scene Text Synthesis},
3 author={Yu Xie and Jielei Zhang and Pengyu Chen and Ziyue Wang and Weihang Wang and Longwen Gao and Peiyi Li and Huyang Sun and Qiang Zhang and Qian Qiao and Jiaqing Fan and Zhouhui Lian},
4 year={2025},
5 eprint={2505.17778},
6 archivePrefix={arXiv},
7 primaryClass={cs.CV},
8 url={https://arxiv.org/abs/2505.17778},
9}