GLM-Image: Text Rendering in Image Generation Models Trained Fully on Domestic AI Chips

    This article examines GLM-Image, an open-source multimodal image generation model reported to be China's first SOTA model trained entirely on domestic AI chips, with a particular focus on its text rendering capabilities. Rather than a product review, it breaks the development into four general technical questions: why generating accurate text is harder than generating images, how text rendering is evaluated (word accuracy and normalized edit distance), what full-stack domestic-chip training implies for compute cost and supply-chain autonomy, and how enterprises can put such capabilities into production. Readers will find practical guidance on scenario selection, building an evaluation set, prompt design, service deployment, and troubleshooting common text-rendering failures.

    Introduction: The Next Watershed for Image Generation

    For image generation models, drawing a cat or a landscape is no longer impressive. What really separates models today is another capability: writing accurate, clear, and visually appealing text within the image. Poster headlines, hand-copied study notes, e-commerce hero images, and annotations in long infographics all depend on combining text with images. Recently, a research team formed jointly by an academic group and a domestic chip vendor released a new open-source image generation model, GLM-Image, claimed to be China’s first SOTA (state of the art) multimodal model trained entirely on domestic chips.

    The model is named “Image” because its capabilities extend beyond traditional text-to-image generation into image-centric mixed text-and-image generation. According to public information, GLM-Image is particularly strong at text rendering. It can generate AI study notes, illustrations, and posters containing large amounts of Chinese characters, and it ranked first among open-source models in two third-party evaluations: complex visual text generation and long-text rendering.

    What do these numbers mean for developers and enterprises? What does open source plus a full domestic-chip stack mean for compute cost, supply-chain stability, and technological self-sufficiency? And how can text-to-image services reliably put such capabilities to use? This article is not a product review. Instead, it breaks this progress into four general technical questions: why visual text generation is difficult, how it is evaluated, what full-stack domestic-chip training means, and how to put it into practice.

    1. Why “Writing Text” Is Harder Than “Drawing Pictures”

    Multimodal image generation models are usually built on a diffusion model backbone and trained with large-scale image-text pairs, giving them strong visual generation ability. But for text rendering, they face three structural challenges.

    1. Complex character structures are easy to distort at the pixel level. Chinese characters have many strokes, deeply hierarchical component combinations, and dense sets of look-alike characters. “己/已/巳,” “未/末,” and “日/曰” often differ by a single stroke or a slight ratio. Pixel-level denoising lacks an explicit glyph prior, so it easily produces missing strokes, extra strokes, sticking, or misalignment. Once the strokes blur, the text the model hands to a visual recognition engine becomes unrecognizable.

    2. A “semantic gap” exists between text representation and generation conditions. Vision-language model tokenizers are designed for natural language; a word is often split into several subword units, and the text encoder outputs semantic features rather than glyph features. The model knows “a title should go here” but doesn’t reliably know “exactly which characters to write and how the strokes should look.” The longer and more specific the text to be rendered in the prompt, the more pronounced this instability becomes.

    3. Long text demands global attention. As text grows from a few characters to dozens or even hundreds, the character dependencies that must be modeled increase substantially. Common failures include repetition, missing characters, text running together, and line-break misalignment across paragraphs or lists.

    In addition, Chinese posters often need to mix Chinese and English text across various fonts and layouts, raising the bar for glyph coverage and consistency in multilingual rendering.

    2. How to Evaluate Text Rendering: Two Core Metrics and Two Benchmark Families

    2.1 The Evaluation Pipeline: From Pixels to Characters

    The mainstream approach to evaluating visual text rendering is “recognize first, then compare.” First let the model generate an image, then use a visual recognition engine to extract the text and its position, and finally compare it character by character against the expected text. This pipeline has three steps:

    • Text detection: locate the text regions in the image;
    • Text recognition: read out the content of each region;
    • Text matching: align the recognized result with the ground-truth annotation and compute metrics.

    Missed detections or misreadings by the recognition engine directly lower the score, so when comparing across models you should use the same recognition pipeline wherever possible.

    2.2 Two Core Metrics: Word Accuracy and Normalized Edit Distance

    • Word Accuracy: the proportion of words (in Chinese scenarios often split by character or word) where the recognized result matches the ground-truth annotation, out of the total number of words. It measures “how much was written correctly.”
    • Normalized Edit Distance (NED): the minimum number of insertions, deletions, and substitutions (i.e., the edit distance) needed to correct the recognized text into the ground-truth text, divided by a reference length and normalized to the 0–1 range. A common definition is:
    1. def normalized_edit_distance(pred: str, ref: str) -> float:
    2. """
    3. Compute the normalized edit distance, in the range [0, 1].
    4. 1.0 means an exact match; 0.0 means the recognized result and the
    5. reference text have no overlap at all.
    6. A reference text of length 0 is treated as an exact match to avoid
    7. division by zero.
    8. """
    9. if len(ref) == 0:
    10. return 1.0 if len(pred) == 0 else 0.0
    11. # Standard single-step edit distance for insertion, deletion, substitution
    12. edit_dist = levenshtein_distance(pred, ref)
    13. # Use the longer sequence length as the denominator, and cap very large gaps
    14. return max(0.0, 1.0 - edit_dist / max(len(pred), len(ref)))

    The two metrics characterize quality from different angles. Word accuracy is sensitive to error position: get one key word wrong in a sentence and accuracy drops noticeably. NED is sensitive to the degree of error: missing a punctuation mark or an individual stroke costs relatively little.

    Used together, they also reveal the phenomenon of “long sentences dragging down average accuracy.” Many rendering models achieve high accuracy on short text but decay quickly as text grows. This is also why long-form text generation needs its own evaluation.

    2.3 Two Benchmark Families: Complex Visual Text Generation and Long-Text Rendering

    The two first-place finishes GLM-Image took correspond exactly to two typical evaluation families.

    • Complex visual text generation benchmark (represented by CVTG-2K): focuses on difficult text rendering scenarios such as complex layouts, special fonts, and artistic typography. GLM-Image achieved a word accuracy of 0.9116 and an NED of 0.9557 in this evaluation, ranking first in both. Leading on both metrics at once means the generated text is not only “written correctly” but also that the magnitude of any errors is kept small.
    • Long-text rendering benchmark (represented by LongText-Bench): focuses on longer Chinese and English text. GLM-Image ranked first among open-source models in Chinese score, English score, and average score. Chinese long text is a long-standing pain point for many models, and GLM-Image leading on both Chinese and English scores shows that its long-text ability is not overfitted to a single language.

    2.4 Three Caveats When Reading Leaderboards

    • “First among open-source” is not “first overall”: leaderboards usually compare only same-class models that can be made public; closed-source commercial models, models that didn’t participate, or newer models are not included. Rankings are time-sensitive, so base your choice on your own testing.
    • Scoring rules affect comparability: how words versus characters are split, case and full-width/half-width normalization, and punctuation and whitespace handling all affect scores. Some benchmarks count only the text the model “was supposed to write correctly”; design-oriented outputs fall outside the evaluation scope. Comparing scores without the evaluation notes can easily lead to wrong conclusions.
    • Public leaderboards cannot replace business validation: leaderboard tasks often differ from real business distributions, so it is advisable to build a test set on your own scenario data and re-test.

    3. What Full-Stack Domestic-Chip Training Means

    “Trained entirely on domestic chips” means that data preprocessing, forward and backward computation, distributed communication, checkpoint saving, and other stages all run on domestic AI chips, without relying on traditional mainstream accelerator cards for core computation.

    Technically, this is a concentrated test of full-stack engineering capability. Whether it can be pulled off depends on how well the chip, framework, model, and training strategy work together:

    • Operator coverage and custom operators: high-frequency operators such as attention, normalization, and positional encoding need deep adaptation to the chip architecture; some operators must be developed in-house or jointly optimized.
    • Precision and numerical stability: mixed-precision training is more prone to numerical overflow or loss spikes on some hardware, requiring safeguards in normalization, loss computation, and gradient clipping.
    • Distributed parallelism: data parallelism, tensor parallelism, pipeline parallelism, and sequence parallelism each have different communication patterns that must match the chip’s inter-chip interconnect capability.
    • Training fault tolerance: long-cycle training needs checkpoint resume and fault self-healing to reduce compute waste.

    From an industry perspective, its value lies in three points:

    • Diversified compute supply: training is no longer tied to a single hardware ecosystem; enterprises can choose from multiple compute sources based on business-continuity needs.
    • Controllable cost structure: open weights let enterprises fine-tune and deploy privately, planning resources by business volume and lowering the long-term cost of per-call usage.
    • Self-sufficiency and data security: with both training and inference done within a domestic software and hardware system, it is easier to meet compliance requirements such as data residency and supply-chain security.

    At the same time, the gap should be recognized soberly. Domestic chips are still catching up in peak compute, interconnect bandwidth, framework ecosystems, and operator-library maturity. It took about 11 months from chip release to the completion of this model’s training, reflecting deep collaboration among the chip, framework, and model teams. This also shows that the threshold for full-stack domestication lies not only in hardware but more in the software ecosystem and engineering experience.

    4. Enterprise Implementation Checklist

    4.1 Scenario Selection: First Decide Whether Your Business Really Needs “Text Writing”

    • Text is the main subject of the image and error tolerance is low, such as teaching materials, knowledge infographics, and marketing posters: prioritize evaluating text rendering capability.
    • Mainly atmospheric or illustrative images where text can be overlaid later: value style and generation efficiency more, and a traditional text-to-image approach works equally well.
    • Precise, controllable layouts are required, such as brand visual guidelines: consider a “base-image generation + design-tool layout” combination.

    4.2 Selection Validation: Build Your Own Text Rendering Evaluation Set

    1. Extract typical samples from real business, covering multiple fonts, layouts, languages, and long text.
    2. Score with the same visual recognition engine, supplemented by manual spot checks.
    3. Observe both word accuracy and NED, focusing on the decay curve on long text.
    4. Re-test inference throughput, latency, and memory usage on the target chip.

    4.3 Prompt Design: Make Clear “What Text to Write”

    • Use quotes to clearly delimit the text to be rendered, so the model doesn’t also draw descriptive text into the image.
    • Specify font style, font-size hierarchy, and alignment, such as “title in bold sans-serif, centered; body in serif, left-aligned.”
    • Describe long text in segments, giving content and position segment by segment.
    • Filter or replace sensitive words, brand names, and copyrighted fonts before generation.

    4.4 Service Deployment: Four General Cloud Capabilities Supporting Production

    • Compute resources: deploy the inference service in a containerized way, and use the container platform’s elastic scheduling to scale pools of domestic chips or other accelerator resources up and down with traffic.
    • Async tasks: study notes and long infographics take a long time to generate; introduce a message queue to decouple, queue, and retry tasks, and use task priorities to distinguish high-value requests.
    • Content storage and delivery: write generated results to object storage and produce access links, accelerate downloads through a content delivery network, and process raw data in a private environment to meet data-residency requirements.
    • Observability: use logging and monitoring/alerting to track latency, failure rate, memory usage, and the pass rate of text-recognition spot checks, catching quality degradation and abnormal traffic early.
    • Security and compliance: filter sensitive information on both input and output, add conspicuous labels or implicit watermarks to AI-generated content, and complete any required regulatory filings and security assessments for generative AI services before going live.

    4.5 Failure Troubleshooting: Common Symptoms and Responses

    Symptom Possible Cause Response
    Missing/extra strokes, look-alike character confusion Lost glyph detail, over-processing in post-production Lower compression and upscaling factors; avoid destructive processing such as sharpening
    Missing/repeated/run-on text Text too long or vague prompt wording Split the text, wrap it in quotes, and generate segment by segment
    Multilingual mixed-layout errors Insufficient glyph coverage or tokenizer interference Reduce the number of languages mixed per pass; generate separately, then composite
    Layout misalignment Lack of layout constraints Specify the layout explicitly in the prompt, or use a model with layout-control capability
    Individual word errors Local defects Redraw the region locally, or use a “base image + design-tool overlay” approach

    5. Challenges and Outlook

    • Editability: whether generated results can be exported as editable layers directly affects the fit with design workflows.
    • Controllability: precise layouts, specified fonts, and multilingual mixing still depend on stronger conditional control.
    • Evaluation systems: existing benchmarks are mostly static images; evaluation for dynamic text in video, multi-page documents, and similar scenarios remains to be improved.
    • Multimodal extension: text rendering capability is the foundation for downstream tasks such as video generation and document understanding. Image-text generation, recognition, and understanding are converging, and such capabilities may be reused across a wider range of scenarios.

    Conclusion

    Open source plus domestic chips brings high-quality Chinese text rendering from a few teams to a broader base of developers. For engineering teams, three things come next: validate with your own data, turn the troubleshooting checklist into a repeatable process, and build elastic services according to business needs. On this basis, you can also use general cloud products from providers such as Baidu AI Cloud—containers, storage, messaging, logging, and so on—to quickly stand up a production environment, so that AI-generated posters can reliably enter real business use.

    It should be noted that this capability still has limitations. Scenarios such as gray-scale substitution, the leading and trailing strokes of underlines, half-width Chinese glyph forms, and coherence in extremely long text have already been discussed in the public community, and the maintainers have noted that the model is still evolving, so these details need thorough testing before launch.