Papers › AnyText: Multilingual Visual Text Generation And Editing

AnyText: Multilingual Visual Text Generation And Editing

6 Nov 2023arXiv:2311.03054archive 2025-07-28

Yuxiang Tuo, Wangmeng Xiang, Jun-Yan He, Yifeng Geng, Xuansong Xie

Diffusion model based Text-to-Image has achieved impressive achievements recently. Although current technology for synthesizing images is highly advanced and capable of generating images with high fidelity, it is still possible to give the show away when focusing on the text area in the generated image. To address this issue, we introduce AnyText, a diffusion-based multilingual visual text generation and editing model, that focuses on rendering accurate and coherent text in the image. AnyText comprises a diffusion pipeline with two primary elements: an auxiliary latent module and a text embedding module. The former uses inputs like text glyph, position, and masked image to generate latent features for text generation or editing. The latter employs an OCR model for encoding stroke data as embeddings, which blend with image caption embeddings from the tokenizer to generate texts that seamlessly integrate with the background. We employed text-control diffusion loss and text perceptual loss for training to further enhance writing accuracy. AnyText can write characters in multiple languages, to the best of our knowledge, this is the first work to address multilingual visual text generation. It is worth mentioning that AnyText can be plugged into existing diffusion models from the community for rendering or editing text accurately. After conducting extensive evaluation experiments, our method has outperformed all other approaches by a significant margin. Additionally, we contribute the first large-scale multilingual text images dataset, AnyWord-3M, containing 3 million image-text pairs with OCR annotations in multiple languages. Based on AnyWord-3M dataset, we propose AnyText-benchmark for the evaluation of visual text generation accuracy and quality. Our project will be open-sourced on https://github.com/tyxsspa/AnyText to improve and promote the development of text generation technology.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2311.03054")

Code

Syntology Ran 4 of 19 code samples harvested from 1 repository linked to this paper; 15 have no recorded run. Of those that ran: 2 ran · our draft was wrong; 2 ran with no contract checked.

By repository: official repository: 19 samples from 1 repository, 4 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

tyxsspa/anytext officialmentioned in papermentioned on GitHubpytorchApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

19 samples harvested; 4 ran; 0 honoured the contract we drafted; 15 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

2ran · our draft was wrong
2ran
15unverified

Licence: 0 of the 19 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from tyxsspa/anytext. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

arr2tensor tyxsspa/anytext/eval/anytext_singleGPU.py official repository ran Apache-2.0 (permissive) · 6cdad824604632dc · report
convert_to_unicode tyxsspa/anytext/bert_tokenizer.py official repository ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · 1923fc05163d207d · report
get_node_name tyxsspa/anytext/tool_add_anytext.py official repository ran · our draft was wrong Apache-2.0 (permissive) · 0dbf855dab1ab575 · report
insert_spaces tyxsspa/anytext/t3_dataset.py official repository ran Apache-2.0 (permissive) · b5429255c1acc5eb · report
draw_glyph tyxsspa/anytext/t3_dataset.py official repository unverified Apache-2.0 (permissive) · e9087166a5c72e8e · report
draw_glyph2 tyxsspa/anytext/t3_dataset.py official repository unverified Apache-2.0 (permissive) · d1df4eb82d1802df · report
draw_pos tyxsspa/anytext/eval/anytext_singleGPU.py official repository unverified Apache-2.0 (permissive) · 62e380ad4669ac47 · report
get_state_dict tyxsspa/anytext/cldm/model.py official repository unverified Apache-2.0 (permissive) · cfc17707f35e7ec4 · report
load tyxsspa/anytext/eval/anytext_multiGPUs.py official repository unverified Apache-2.0 (permissive) · 75c1cd45779a2497 · report
load_data tyxsspa/anytext/eval/controlnet_singleGPU.py official repository unverified Apache-2.0 (permissive) · 5614aa5a213e4405 · report
load_json tyxsspa/anytext/eval/anytext_multiGPUs.py official repository unverified Apache-2.0 (permissive) · 5958926c73426c86 · report
load_state_dict tyxsspa/anytext/cldm/model.py official repository unverified Apache-2.0 (permissive) · df733a879693145d · report
load_txt tyxsspa/anytext/dataset_util.py official repository unverified Apache-2.0 (permissive) · c986b2b9b07493a4 · report
load_vocab tyxsspa/anytext/bert_tokenizer.py official repository unverified Apache-2.0 (permissive) · aaf1cb2c01043065 · report
printable_text tyxsspa/anytext/bert_tokenizer.py official repository unverified Apache-2.0 (permissive) · 0e5615f8994003cf · report
renew_attention_paths tyxsspa/anytext/lora_util.py official repository unverified Apache-2.0 (permissive) · 399a269e327cf154 · report
renew_resnet_paths tyxsspa/anytext/lora_util.py official repository unverified Apache-2.0 (permissive) · dfb052a0af48540f · report
save tyxsspa/anytext/eval/anytext_multiGPUs.py official repository unverified Apache-2.0 (permissive) · 8f474e60fb5e395f · report
shave_segments tyxsspa/anytext/lora_util.py official repository unverified Apache-2.0 (permissive) · cea0bc82e0c96896 · report

Tasks

Image GenerationOptical Character Recognition (OCR)Text Generation

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Image Generation TextAtlasEval Anytext StyledTextSynth Clip Score 0.2501 #7 of 7 Archive leaderboard report
Image Generation TextAtlasEval Anytext StyledTextSynth FID 117.71 #7 of 7 Archive leaderboard report
Image Generation TextAtlasEval Anytext StyledTextSynth OCR (Accuracy) 0.35 #7 of 7 Archive leaderboard report
Image Generation TextAtlasEval Anytext StyledTextSynth OCR (Cer) 0.98 #7 of 7 Archive leaderboard report
Image Generation TextAtlasEval Anytext StyledTextSynth OCR (F1 Score) 0.66 #7 of 7 Archive leaderboard report
Image Generation TextAtlasEval Anytext TextScenesHQ Clip Score 0.2174 #7 of 7 Archive leaderboard report
Image Generation TextAtlasEval Anytext TextScenesHQ FID 101.32 #7 of 7 Archive leaderboard report
Image Generation TextAtlasEval Anytext TextScenesHQ OCR (Accuracy) 0.42 #7 of 7 Archive leaderboard report
Image Generation TextAtlasEval Anytext TextScenesHQ OCR (Cer) 0.95 #7 of 7 Archive leaderboard report
Image Generation TextAtlasEval Anytext TextScenesHQ OCR (F1 Score) 0.8 #7 of 7 Archive leaderboard report
Image Generation TextAtlasEval Anytext TextVisionBlend Clip Score - #7 of 7 Archive leaderboard report
Image Generation TextAtlasEval Anytext TextVisionBlend FID - #7 of 7 Archive leaderboard report
Image Generation TextAtlasEval Anytext TextVisionBlend OCR (Accuracy) - #7 of 7 Archive leaderboard report
Image Generation TextAtlasEval Anytext TextVisionBlend OCR (Cer) - #7 of 7 Archive leaderboard report
Image Generation TextAtlasEval Anytext TextVsionBlend OCR (F1 Score) - #7 of 7 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Diffusion

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections