Training SOTA Multimodal Models on Domestic Chips: Technical Breakthroughs in Visual Text Rendering

    This article examines how a multimodal image generation model was trained end to end on domestic chips and achieved leading open-source results in complex visual text generation and long-text rendering. It breaks down why text rendering is difficult, the evaluation metrics used to measure it, the data, representation, training, and inference techniques behind it, the engineering practices required for full-pipeline training on domestic hardware, and a practical framework for reducing inference cost. Developers and enterprises will find reusable methods for building controllable content generation systems.

    1. Introduction: Multimodal Generation Enters the Era of “Autonomous Compute + Usable Text”

    Multimodal image generation is shifting from “looking good” to “being informationally usable.” Early models improved quickly in composition, lighting, and style. However, in scenarios such as posters, covers, and infographics, a single missing stroke or invented symbol can sharply reduce the production value of the entire image. At the same time, training depends heavily on compute, so the ability to complete the full training pipeline on domestic chips has become an important marker of technical autonomy.

    A noteworthy signal has recently emerged in the industry: a team working with a domestic chip vendor completed a multimodal image generation model trained entirely on domestic chips, achieving leading results among open-source models in both complex visual text generation and long-text rendering evaluations. Setting aside the specific product, this article focuses on the general technical questions behind it: how to make a generative model “write the right characters,” how to train stably on domestic compute, and how to reduce inference cost to a level suitable for large-scale deployment.

    2. Problem Definition: Why Text Rendering Is Harder Than It Seems

    Text rendering may look like “just drawing a few more strokes,” but it is one of the most rigidly constrained parts of a generative model. It requires the model to accomplish three things at once:

    • Glyph correctness: stroke structure, component proportions, and connected or separated strokes must follow writing conventions.
    • Semantic alignment: the rendered text must match the prompt’s target copy character by character, with no rewriting, missing characters, or added characters.
    • Layout rationality: font size, line spacing, alignment, and hierarchy must contrast clearly with the background; long text also requires automatic line wrapping and region partitioning.

    The difficulty lies in the fact that diffusion-based generation is essentially denoising in a continuous space, while text is a discrete symbol system. The model must learn both “the image statistics of what text looks like” and “symbol-level correctness,” and these two requirements are naturally in tension. Complex visual text generation evaluations typically focus on accuracy under short sentences, multiple lines, artistic fonts, and background interference. Long-text rendering evaluations further introduce paragraph length, mixed Chinese-English text, and layout consistency, significantly raising the difficulty.

    3. Evaluation Dimensions: Accuracy, Edit Distance, and Long-Text Consistency

    By common public evaluation standards, text rendering is usually measured with two types of metrics:

    1. Word Accuracy: the proportion of target words in the generated image that can be recognized and matched, reflecting whether the text was written correctly.
    2. Normalized Edit Distance (NED): aligns the recognized result with the target text to measure the degree of difference, where values closer to 0 are better, reflecting how much was wrong.

    In complex visual text generation scenarios, leading models can achieve word accuracy above 0.9 and normalized edit distance performance above 0.95, meaning that the vast majority of target words are rendered correctly. In long-text rendering scenarios, evaluation is usually split into Chinese, English, and average score, examining the model’s stability under longer copy. The engineering takeaway is: short text is judged on glyphs, while long text is judged on layout and consistency, and the two require different data mixes and loss designs.

    4. Technical Breakdown: Four Levers to Make the Model “Read and Write Correctly”

    4.1 Data: High-Quality Image-Text Alignment and Glyph Coverage

    The upper limit of text rendering ability is determined by data. Viable practices include building large-scale “copy-layout-background” triplets covering mixed Chinese-English text, artistic fonts, seal scripts, and handwriting; running OCR back-labeling and character-by-character verification on training samples to remove samples with wrong characters; and resampling by character frequency and component rarity to alleviate insufficient learning of long-tail glyphs.

    4.2 Representation: Dual-Channel Injection of Text and Visual Conditions

    Treat text content as a strong condition, injected into the denoising backbone through a text encoder and cross-attention. At the same time, feed layout information (region boxes, alignment, font size hierarchy) as a structured condition, so the model “knows where to write and how large” before generation. Illustrative pseudocode:

    1. text_feat = text_encoder(target_text) # character-level semantics and glyph priors
    2. layout_feat = layout_encoder(boxes, sizes) # layout structure conditions
    3. cond = fuse(text_feat, layout_feat, image_context)
    4. for t in reversed(timesteps):
    5. noise = unet(noisy_latent, t, cond)
    6. noisy_latent = scheduler.step(noise, t, noisy_latent)
    7. image = vae.decode(noisy_latent)

    4.3 Training: Staged Curriculum and Targeted Losses

    First learn composition and style on large-scale general image-text data, then enter a text-strengthening stage, and finally use long-text samples for stability convergence. In addition to the standard diffusion objective, the loss can introduce a recognition consistency constraint (supervising with recognition results) and a layout alignment constraint to reduce the probability of “looking right but writing wrong.”

    4.4 Inference: Size Adaptation and Multi-Ratio Output

    Real business needs multiple ratios such as 1:1, 3:4, and 16:9. A common approach is to introduce multi-scale and arbitrary-ratio sampling during training, and adapt the latent space to the target canvas at inference time to avoid stretching and distortion. For long text, use segmented generation and layout stitching to keep line spacing and hierarchy stable.

    5. Engineering Essentials for Full-Pipeline Training on Domestic Chips

    Completing full-pipeline training on domestic chips depends not on a single usable operator, but on the stability and efficiency of the entire chain:

    • Operator and graph compilation adaptation: verify coverage of high-frequency operators such as attention, normalization, and convolution, and use graph-mode compilation to reduce scheduling overhead.
    • Mixed precision and numerical stability: use lower-precision computation while preserving convergence, and keep higher precision for layers prone to overflow.
    • Distributed parallelism: combine data parallelism with gradient accumulation, and introduce tensor or pipeline parallelism when necessary to reduce per-card memory pressure.
    • Checkpoints and fault tolerance: long-cycle training must support resuming from breakpoints and self-healing from failures to reduce wasted compute.
    • Monitoring and observability: track throughput, loss curves, and hardware metrics through logging services and monitoring alerts to quickly locate slow nodes.

    6. Cost and Deployment: Breaking Down “One Image for a Few Cents” into Reusable Methods

    Low-cost inference is not a single trick but a combination:

    1. Model side: distillation and quantization reduce computation per inference.
    2. Service side: batching and request merging improve throughput, and elastic container platforms scale up and down by load.
    3. Storage side: store input assets and outputs separately in object storage, and use caching to reduce repeated computation.
    4. Quality side: automatically identify low-confidence samples and trigger retries, avoiding manual rework that would offset the cost advantage.

    In content production scenarios, covers, posters, and infographics are often generated in batches and iterated quickly. Every order-of-magnitude drop in cost directly changes business feasibility.

    7. Practical Recommendations and Risk Notes

    • Scenario priority: start with covers and posters that have a high proportion of text and low fault tolerance to quickly validate returns.
    • Evaluation first: build a small internal evaluation set covering mixed Chinese-English text, long text, and artistic fonts.
    • Compliance and copyright: training and generation assets require attention to licensing and content safety, with a review chain in place.
    • Avoid exaggeration: keep reproducible standards for metrics and cost to prevent “impressive demos but unstable production.”

    8. Conclusion

    Completing full-pipeline training on domestic chips and leading in text rendering evaluations shows that autonomous compute can already support high-difficulty multimodal tasks. For developers, what is truly reusable is the methodology: use data and layout constraints to “write the right characters,” use curriculum training and loss design to improve long-text stability, and use engineering optimization to reduce cost to a scalable level. If an enterprise wants to quickly build similar capabilities in the cloud, it can construct a training and inference loop based on general cloud products such as container platforms, object storage, and monitoring alerts, achieving an autonomous and controllable content generation system.