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 View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

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

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 19 code samples harvested from 1 repository linked to this paper: 14 ran (of which 0 constructed an object rather than computing a result; 4 with no instrument failure: 0 honoured, 0 violated, 4 with no contract checked; 10 where Syntology's instrument failed) · 5 unverified. Where Syntology's instrument failed: 10 where our contract draft was wrong; failures of Syntology's instrument, not of the code.

By repository: official repository: 19 samples from 1 repository, 14 ran (4 with no instrument failure; 10 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Levels written between 2026-09-22 and 2026-09-26 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed. 1 of the 14 samples that ran has no recorded date.

tyxsspa/anytext officialmentioned in papermentioned on GitHubpytorchApache-2.0Syntology: 19 samples, 14 ran (10 instrument-failed) · 5 unverified 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: 14 ran (of which 0 constructed an object rather than computing a result; 4 with no instrument failure: 0 honoured, 0 violated, 4 with no contract checked; 10 where Syntology's instrument failed) · 5 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page last changed ; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

10ran · our draft was wrong
4ran
5unverified

Licence: 1 of the 19 samples is pointer only, meaning Syntology does not serve that copy's text. For that sample, this paper's copy is under a permissive licence and cleared, but the stored copy of the same code that Syntology serves is not; the licence label's tooltip gives Syntology's recorded reason. 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. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (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 are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. 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 six 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; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. 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.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity.

tyxsspa/anytext official repository 19 samples, 14 ran (10 instrument-failed) · 5 unverified
arr2tensor eval/anytext_singleGPU.py ran Apache-2.0 (permissive) · 6cdad824604632dc · report fixture: signature arr:ndarray/3/float, bs:int/0/int · returned Tensor · level recorded 2026-09-24
convert_to_unicode in 40 papers bert_tokenizer.py ran · our draft was wrong fingerprinted Apache-2.0 (permissive) here; the stored copy is pointer only · 1923fc05163d207d · report fixture: signature text:str/0/str · returned str · level recorded 2026-09-22
draw_pos eval/anytext_singleGPU.py ran Apache-2.0 (permissive) · 62e380ad4669ac47 · report fixture: signature ploygon:ndarray/2/float, prob:float/0/float · returned ndarray · level recorded 2026-09-25
get_node_name in 18 papers tool_add_anytext.py ran · our draft was wrong Apache-2.0 (permissive) · 0dbf855dab1ab575 · report fixture: signature name:str/0/str, parent_name:str/0/str · returned tuple · level recorded, date not recorded
get_state_dict in 105 papers cldm/model.py ran · our draft was wrong Apache-2.0 (permissive) · cfc17707f35e7ec4 · report fixture: signature d:dict/0/? · returned dict · level recorded 2026-09-25
insert_spaces t3_dataset.py ran Apache-2.0 (permissive) · b5429255c1acc5eb · report fixture: signature string:str/0/str, nSpace:int/0/int · returned str · level recorded 2026-09-24
load in 392 papers eval/anytext_multiGPUs.py ran · our draft was wrong Apache-2.0 (permissive) · 75c1cd45779a2497 · report fixture: signature file_path:str/0/str · returned dict · level recorded 2026-09-25
load_json in 344 papers eval/anytext_multiGPUs.py ran · our draft was wrong Apache-2.0 (permissive) · 5958926c73426c86 · report fixture: signature file_path:str/0/str · returned dict · level recorded 2026-09-25
load_txt in 18 papers dataset_util.py ran · our draft was wrong Apache-2.0 (permissive) · c986b2b9b07493a4 · report fixture: signature file_path:str/0/str · returned list · level recorded 2026-09-25
load_vocab in 107 papers bert_tokenizer.py ran · our draft was wrong Apache-2.0 (permissive) · aaf1cb2c01043065 · report fixture: signature vocab_file:str/0/str · returned OrderedDict · level recorded 2026-09-25
printable_text in 36 papers bert_tokenizer.py ran · our draft was wrong Apache-2.0 (permissive) · 0e5615f8994003cf · report fixture: signature text:str/0/str · returned str · level recorded 2026-09-26
renew_attention_paths lora_util.py ran fingerprinted Apache-2.0 (permissive) · 399a269e327cf154 · report fixture: signature old_list:list/1/str, n_shave_prefix_segments:int/0/int · returned list · level recorded 2026-09-25
renew_resnet_paths in 15 papers lora_util.py ran · our draft was wrong Apache-2.0 (permissive) · dfb052a0af48540f · report fixture: signature old_list:list/1/str, n_shave_prefix_segments:int/0/int · returned list · level recorded 2026-09-25
shave_segments in 15 papers lora_util.py ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · cea0bc82e0c96896 · report fixture: signature path:str/0/str, n_shave_prefix_segments:int/0/int · returned str · level recorded 2026-09-25
draw_glyph t3_dataset.py unverified Apache-2.0 (permissive) · e9087166a5c72e8e · report
draw_glyph2 t3_dataset.py unverified Apache-2.0 (permissive) · d1df4eb82d1802df · report
load_data in 700 papers eval/controlnet_singleGPU.py unverified Apache-2.0 (permissive) · 5614aa5a213e4405 · report
load_state_dict in 114 papers cldm/model.py unverified Apache-2.0 (permissive) · df733a879693145d · report
save in 10 papers eval/anytext_multiGPUs.py unverified Apache-2.0 (permissive) · 8f474e60fb5e395f · 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