Papers › Brush Your Text: Synthesize Any Scene Text on Images via Diffusion Model

Brush Your Text: Synthesize Any Scene Text on Images via Diffusion Model

19 Dec 2023arXiv:2312.12232archive 2025-07-28

Lingjun Zhang, Xinyuan Chen, Yaohui Wang, Yue Lu, Yu Qiao

Recently, diffusion-based image generation methods are credited for their remarkable text-to-image generation capabilities, while still facing challenges in accurately generating multilingual scene text images. To tackle this problem, we propose Diff-Text, which is a training-free scene text generation framework for any language. Our model outputs a photo-realistic image given a text of any language along with a textual description of a scene. The model leverages rendered sketch images as priors, thus arousing the potential multilingual-generation ability of the pre-trained Stable Diffusion. Based on the observation from the influence of the cross-attention map on object placement in generated images, we propose a localized attention constraint into the cross-attention layer to address the unreasonable positioning problem of scene text. Additionally, we introduce contrastive image-level prompts to further refine the position of the textual region and achieve more accurate scene text generation. Experiments demonstrate that our method outperforms the existing method in both the accuracy of text recognition and the naturalness of foreground-background blending.

PaperPDFCodeCode Syntology ran

In Syntology View this paper on Syntology: its repositories, every harvested function with whether it ran, its licence and the call to fetch it.

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="2312.12232")

Code

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

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

ecnuljzhang/brush-your-text officialmentioned in papermentioned on GitHubpytorch 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; 15 ran; 0 honoured the contract we drafted; 4 have no recorded run. Read from Syntology's graph 2026-09-25; that is when this build read the record, not when the samples ran.

1ran · our draft was wrong
14ran
4unverified

Licence: 19 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 ecnuljzhang/brush-your-text. “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.

DST ecnuljzhang/brush-your-text/controlnet_util/Textgen/poisson_reconstruct.py official repository ran fingerprinted no licence file found · pointer only · c9b0b805d01042eb · report
IDST ecnuljzhang/brush-your-text/controlnet_util/Textgen/poisson_reconstruct.py official repository ran fingerprinted no licence file found · pointer only · d999d495c22812ff · report
crop_safe ecnuljzhang/brush-your-text/controlnet_util/Textgen/render_text_mask.py official repository ran no licence file found · pointer only · d2b03b93e65deb8b · report
diffusion_step ecnuljzhang/brush-your-text/models/attention_utils.py official repository ran no licence file found · pointer only · a042902caede448b · report
dir_is_rtl ecnuljzhang/brush-your-text/controlnet_util/Textgen/fribidi.py official repository ran fingerprinted no licence file found · pointer only · e0158ea7640cafc4 · report
get_color_matrix ecnuljzhang/brush-your-text/controlnet_util/Textgen/colorize.py official repository ran no licence file found · pointer only · 55ef9a43f542bc10 · report
get_font_color ecnuljzhang/brush-your-text/controlnet_util/Textgen/colorize.py official repository ran no licence file found · pointer only · 968d92307b85d92d · report
get_grads ecnuljzhang/brush-your-text/controlnet_util/Textgen/poisson_reconstruct.py official repository ran fingerprinted no licence file found · pointer only · 48688abc93b004ef · report
image_grid ecnuljzhang/brush-your-text/controlnet_util/util.py official repository ran no licence file found · pointer only · 0ed50e0e68648732 · report
latent2image ecnuljzhang/brush-your-text/models/attention_utils.py official repository ran · our draft was wrong no licence file found · pointer only · e3c3bb87bbe9b4a7 · report
level_is_rtl ecnuljzhang/brush-your-text/controlnet_util/Textgen/fribidi.py official repository ran fingerprinted no licence file found · pointer only · 6091e3efb2400b73 · report
level_to_dir ecnuljzhang/brush-your-text/controlnet_util/Textgen/fribidi.py official repository ran fingerprinted no licence file found · pointer only · ed496f4830b5cb36 · report
next_step ecnuljzhang/brush-your-text/controlnet_util/util.py official repository ran no licence file found · pointer only · 1ccf7fbf45184c1a · report
rect2xy ecnuljzhang/brush-your-text/controlnet_util/Textgen/render_text_mask.py official repository ran fingerprinted no licence file found · pointer only · adceda65e4c99e11 · report
text_under_image ecnuljzhang/brush-your-text/models/attention_utils.py official repository ran no licence file found · pointer only · 85d5eb123674597d · report
center2size ecnuljzhang/brush-your-text/controlnet_util/Textgen/render_text_mask.py official repository unverified no licence file found · pointer only · beccbc79a14cc716 · report
colorize ecnuljzhang/brush-your-text/controlnet_util/Textgen/colorize.py official repository unverified no licence file found · pointer only · 490ff991bd344d43 · report
init_prompt ecnuljzhang/brush-your-text/controlnet_util/util.py official repository unverified no licence file found · pointer only · a0a4d94af120c56f · report
text_image ecnuljzhang/brush-your-text/controlnet_util/synthtext.py official repository unverified no licence file found · pointer only · 5f01d7c54fa3cd2e · report

Tasks

Image GenerationText GenerationText to Image GenerationText-to-Image Generation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

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