DiffCTE: Consistent Style Text Editing with Diffusion Model

Xiangxiang Wang, Huang Chen, Bing Liu, Haoyu Cao, Xin Li, Yinsong Liu, Deqiang Jiang, Xing SunarXiv 2026

TL;DR

Diffusion models can paint photorealistic landscapes in seconds, yet ask them to change a single word on a neon diner sign, and they often botch the spelling or slap on a jarring, mismatched font. DiffCTE solves this by pairing a standard diffusion model with a Vision-Language Model (VLM) equipped with a specialized "Style Abstractor." The result is seamless scene text editing and style transfer that nails both the exact characters—even complex Chinese glyphs—and the visual vibe of the original scene.

Figure 1. Visualization of DiffCTE capabilities. DiffCTE excels in: (a) Scene text editing: Modifying target content while main- taining the original image style, resulting in consistent and natural text editing. (b) Text style transfer: Adjusting target style based on a reference image, effectively transferring the style with a con- sistent appearance.

What Problem Does This Paper Address?

Imagine trying to change a street sign from "SHOPPING CENTER" to "SHOPPING DiffCTE," or swapping its metallic lettering for glowing pink neon. This is scene text editing: altering words inside a real-world image while preserving the background texture, lighting, font, and geometry.

Historically, GAN-based methods tackled this as a style-transfer problem, cropping out text regions to process them, which often left unnatural seams or failed on arbitrary font sizes and rotations. Recently, Diffusion Models (like Stable Diffusion) took over image synthesis. While phenomenal at general scenes, standard diffusion models lack a fine-grained understanding of glyphs (the specific shapes of characters) and typographic styles. Even recent text-focused diffusion models struggle when glyphs get intricate or when asked to maintain strict stylistic harmony with the surrounding image.

Methods

DiffCTE builds on top of a standard Stable Diffusion backbone (specifically using a fine-tuned VAE and U-Net from Stable Diffusion 2 Inpainting), but swaps out the standard text-prompt conditioning for something much more typography-aware: a pre-trained Vision-Language Model (VLM).

Figure 2. The DiffCTE framework comprises three main components: VAE, U-Net, and VLM. The process begins with the VAE block encoding the input image xs into a latent space zt. Next, the Diffusion block reconstructs the expected image utilizing the style embedding extracted by the Style Abstractor, as well as the image latent vector zt, mask m, and masked latent image vector xm. Concurrently, the VLM block enhances the style embedding by integrating the input image xs and instruction text xi. The Glyph Render, processing the instruction text xi, generates a glyph image xg, which is subsequently divided into patches. The Vision Encoder then transforms the input image xs into visual embeddings. By combining these visual embeddings, image patches, and text tokens, the Style Abstractor outputs a refined style embedding, which is employed by the Text Decoder for accurate localization and recognition.

Here is what happens under the hood:

  • The Style Abstractor (The Secret Sauce): Sitting inside the VLM between a Vision Encoder and a Text Decoder, this transformer-based module acts as a typographic translator. It takes visual features from the input image, a rendered "glyph image" (either a plain, uniform-font render of the target word, or a reference style image), and a text instruction (e.g., Change "DINER" to "MODEL"). Using cross-attention, it distills font, weight, slant, color, and glyph structure into a fixed-dimension style embedding.
  • Multi-Task VLM Guidance: To keep the Style Abstractor sharp, its output is also fed into a frozen Text Decoder queried to do two auxiliary tasks: recognize the text and predict the bounding-box coordinates of the editing region (creating the edit mask automatically).
  • Conditioned Denoising: Instead of just feeding a noisy latent image into the U-Net, DiffCTE concatenates the noisy latent, a masked image latent, and the text mask, while injecting the Style Abstractor's style embeddings via cross-attention. Noticeably, during main training, the VAE, Vision Encoder, and Text Decoder are kept frozen—only the Style Abstractor and U-Net are updated.
  • Hybrid Training Strategy: Because real-world paired data (the exact same street sign with two different words) practically doesn't exist, the authors use a two-pronged approach. First, supervised training on synthetic paired images teaches the model how to extract styles—either keeping the original image's style or transferring style from a reference image. Second, self-supervised training on real images masks out existing text and trains the model to reconstruct the original image from scratch, grounding its generation in realistic lighting and textures.

Datasets

No new public benchmark is introduced, as the authors combine synthetic data (generated with random numbers, English words, and Chinese characters) with an amalgamation of existing public text-image datasets:

  • Training: CLDA, XFUND, CORD, Ticket, PubLayNet, and various ICDAR datasets.
  • Evaluation: 1,000 samples each randomly drawn from ArT, COCOText, TextOCR, and ICDAR13.

Key Insights and Ideas

  • CLIP isn't enough for typography: In an ablation study, replacing the Style Abstractor's embeddings with standard CLIP text embeddings caused average OCR accuracy to plummet from 85.63% to 51.93%. CLIP understands what a word means, not how its serif curves or neon glow should look.
  • Automated masking works just as well as human masking: Letting the VLM's Text Decoder predict the editing bounding box yielded virtually identical performance (85.89% OCR accuracy) to feeding in manually drawn masks (85.63%), proving the model can find and edit text autonomously.
  • Cross-lingual and reference-based flexibility: Because glyph patches are explicitly rendered and cross-attended with visual features, the model smoothly handles intricate Chinese characters (e.g., translating "1943" into complex traditional Chinese numerals on a brass plaque) and one-shot style transfer from an external reference crop—tasks where predecessors like DiffSTE and DiffUTE falter.
Complex Chinese character generation preserving original plaque and sign styles

Key Results

DiffCTE was evaluated on text correctness via both an automated OCR model and human evaluators (Cor):

  • Across the four test sets, DiffCTE achieved an average 85.63% OCR accuracy and 87.75% human-evaluated correctness.
  • This beats the previous state-of-the-art diffusion method, DiffSTE (83.89% OCR / 85.25% Cor), and leaves GAN-based methods like MOSTEL (46.68% OCR / 64.50% Cor) and instruction-tuned Stable Diffusion 2 (52.76% OCR / 50.00% Cor) far behind.
  • Qualitatively, competing models frequently misspelled target words (e.g., rendering "MLNEILL" or "MIOEL" instead of "MODEL") or lost background textures, whereas DiffCTE preserved 3D embossing, shadows, and neon halos.
Figure 3. Visualization examples from our text editing experiment. Different rows showcase the text editing results obtained by various methods, with the final row emphasizing the outcome of our proposed approach. Our DiffCTE demonstrates a substantial improvement over other methods, affirming its capability to preserve stylistic consistency in the generated text.

Limitations and Future Work

The authors do not include a dedicated limitations section, though they briefly note that DiffCTE's initial demonstrations in reference-based style transfer and complex cross-lingual character generation hold "potential for further refinements" and advancements in future diffusion-based text editing research.

Summary updated

BibTeX
@misc{wang2026diffcte,
  author = {Xiangxiang Wang and Huang Chen and Bing Liu and Haoyu Cao and Xin Li and Yinsong Liu and Deqiang Jiang and Xing Sun},
  title = {{DiffCTE: Consistent Style Text Editing with Diffusion Model}},
  year = {2026},
  eprint = {2611.38390},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.38390},
}
Figure