Multimodal Image Generation on Domestic Chips: Training, Text Rendering, and Deployment Practices

    This article examines the engineering and product challenges of training multimodal image generation models on domestic chips for production use. It covers text rendering accuracy, operator and computation graph adaptation, multi-card parallelism, mixed-precision stability, structured data construction, and specialized evaluation. It also presents workflows for social media covers, strategies for commercial posters and infographics, deployment and cost control practices, and key lessons for developers moving from visually appealing samples to reliable, text-accurate, layout-stable image generation.

    In recent years, the visual quality of image generation models has improved steadily. However, “looking good” does not mean “usable content.” In scenarios such as Chinese posters, long-form science explainer graphics, event promotion pages, and social media covers, whether text is accurate, layout is stable, and information hierarchy is clear is often more important than pure visual quality.

    A multimodal image generation system truly aimed at production environments must solve at least three problems at the same time: first, whether the model can understand natural language instructions; second, whether the model can generate visual content that matches the description; third, whether the model can accurately render titles, body text, labels, and captions into the image. For Chinese-language applications, the third point is especially critical.

    1. From “Can Draw” to “Can Deliver”

    Traditional image generation models already have some ability to handle short English words. But when facing long Chinese sentences, complex fonts, numeric combinations, and multi-paragraph layouts, they often show the following problems:

    • Missing strokes in Chinese characters, making text unrecognizable;
    • Confusion between similar characters, visually close characters, and rare characters;
    • Random or repeated characters appearing in the middle of long text;
    • Titles overlapping with the background and reducing readability;
    • Unstable text position, font size, and line spacing;
    • Inconsistent text styles across different regions of the same image.

    These problems are not merely “insufficient visual detail.” They reflect insufficient coordination between visual generation and language modeling. The model needs to first understand the text content, then decide the position, size, direction, and visual style of the text in the image, and finally convert discrete character structures into continuous pixels or visual features.

    Therefore, the evaluation criteria for a new generation of multimodal image generation models should not rely only on subjective aesthetics. They should also include text accuracy, edit distance, layout consistency, instruction following, and overall visual quality.

    2. Engineering Challenges of Training on Domestic Chips

    Training models in a domestic chip environment is not simply a matter of replacing hardware. It requires systematic adaptation of training frameworks, operator implementations, communication mechanisms, and memory management.

    2.1 Operator and Computation Graph Adaptation

    Image generation models usually include text encoders, visual encoders, diffusion or flow-based generation modules, and complex attention structures. Different hardware platforms do not fully agree on support for operators such as matrix multiplication, normalization, positional encoding, mixed precision, and random sampling.

    Engineering teams typically need to complete the following work:

    1. Check whether core operators have hardware-accelerated implementations;
    2. Replace or fuse operators that lack efficient implementations;
    3. Handle numerical stability issues under different precisions;
    4. Verify consistency between forward and backward training computations;
    5. Adapt to dynamic input sizes and variable-length text.

    If teams rely simply on generic implementations, the model may run, but training throughput, memory usage, and stability may fall short of expectations. Therefore, training on domestic chips often requires algorithm teams and low-level system teams to work together on performance tuning.

    2.2 Multi-Card Communication and Parallelism Strategies

    Large-scale multimodal models usually require data parallelism, model parallelism, or pipeline parallelism. Gradient synchronization, parameter broadcasting, and activation transmission during training directly affect overall efficiency.

    In actual engineering, the appropriate parallelism method should be selected based on model structure and hardware topology. For example:

    • When model parameter scale is large, parameter sharding can be used;
    • When single-card memory is insufficient, gradient checkpointing and activation recomputation can be used;
    • When data scale is large, expanding data parallelism can be prioritized;
    • When communication overhead is high, synchronization frequency should be reduced or the communication topology optimized;
    • When training is unstable, parallelism complexity should be lowered, and convergence should be ensured before performance optimization.

    The key goal in a domestic chip environment is not simply to pursue peak compute throughput, but to build a stable, reproducible, and scalable training pipeline.

    2.3 Mixed Precision and Stability

    Image generation models often use low-precision computation to improve training speed and reduce memory usage. However, low precision can also cause gradient overflow, loss oscillation, or degraded generation quality.

    More reliable practices include:

    • Use low precision for matrix computation and retain higher precision for key normalization and loss computation;
    • Introduce dynamic loss scaling;
    • Monitor gradient norms, activation ranges, and anomalous samples;
    • Focus on early training and phases where the learning rate changes;
    • Use fixed random seeds and a unified evaluation set for regression testing.

    Only when training stability, model quality, and hardware efficiency all meet requirements does a mixed-precision approach have practical value.

    3. Why Text Rendering Is Hard to Improve

    Text in images is different from ordinary objects. A cup can usually still be recognized as a cup even if its edge changes slightly. But a Chinese character can become a completely different character if one radical changes.

    3.1 Complex Character Structure

    Chinese characters are numerous and structurally diverse. Subtle changes in horizontal, vertical, left-falling, and right-falling strokes can affect recognition. The model must not only remember the visual form of characters but also understand their semantic relationships in context.

    3.2 Text Length Amplifies Errors

    Errors in short titles are relatively easy to control. But when an image contains multiple lines of explanatory text, any error in a character, punctuation mark, or digit can reduce the usability of the entire passage. Long text generation also involves line breaks, alignment, letter spacing, and region allocation.

    3.3 Text and Visual Style Must Be Unified

    Text in commercial posters is not simply overlaid. Titles usually need to remain consistent with background perspective, lighting, material, and color. If the model pursues only character correctness, it may produce an effect where “the characters are correct, but they look pasted on afterward.”

    3.4 Prompt Ambiguity

    Users often describe requirements in natural language, such as “make a travel guide cover” or “highlight the three main notes.” The model needs to infer the title, body text, people, background, and information hierarchy. If the prompt is not clear enough, the model may make poor trade-offs in content selection.

    Therefore, improving text rendering capability usually requires a combination of high-quality text-image data, structured annotations, region-level supervision, OCR feedback, and dedicated evaluation tasks. It cannot rely only on scaling general image data.

    4. Data Construction for Practical Scenarios

    High-quality data is the foundation of text generation capability. Training data should not contain only “images plus descriptions.” It can also include more structured information:

    • Text content in the image;
    • Bounding box for each text segment;
    • Font size and direction;
    • Semantic categories such as title, body text, and label;
    • Occlusion relationships between text and background;
    • Overall image style and usage scenario;
    • Whether text is clear and whether there are typographical errors;
    • Multilingual or mixed numeric text.

    Data cleaning is equally important. Low-resolution images, heavily compressed images, blurry text samples, and images with incorrect annotations may teach the model incorrect patterns. For Chinese data, special handling is also needed for variant characters, mixed traditional and simplified characters, special symbols, internet slang, and nonstandard punctuation.

    For data mixing, samples can be stratified by application scenario:

    1. Short-title posters, to improve core text accuracy;
    2. Multi-line explanatory images, to train long-text layout;
    3. Infographics, to learn modular layout;
    4. Handwritten-style content, to enhance font and material variation;
    5. Mixed Chinese-English content, to improve cross-language adaptability;
    6. Numbers, dates, and price information, to reduce structured text errors.

    5. Evaluation Cannot Rely Only on Subjective Quality

    If quality is judged only by manually browsing images, evaluation is easily affected by aesthetic preferences, and specific problems are hard to locate. A more complete evaluation system should include at least the following dimensions.

    5.1 Text Accuracy

    Extract text from generated images using a recognition model, then compare it character by character with the target text. This metric is suitable for measuring the accuracy of titles, labels, and short sentences.

    5.2 Edit Distance

    Edit distance measures how many insertions, deletions, and substitutions are needed to make the generated text consistent with the target text. After normalization, it can compare error levels across texts of different lengths.

    5.3 Layout Consistency

    Evaluate whether text regions appear in reasonable positions, whether titles are prominent enough, whether body text overlaps, and whether the information hierarchy meets prompt requirements.

    5.4 Visual Quality

    This includes subject clarity, color harmony, composition completeness, detail richness, and style consistency.

    5.5 Instruction Following

    For example, if the user requests “include people, attractions, and three notes,” whether the model actually generates these elements rather than only an image with a similar style but missing information.

    In actual projects, it is advisable to use both automatic metrics and manual spot checks. Automatic metrics support continuous regression testing, while manual review is better for finding issues in aesthetics, semantics, and user experience.

    6. Generation Workflow for Social Media Covers

    Taking a social media cover as an example, a relatively complete generation workflow can be divided into five steps.

    Step 1: Clarify the Content Goal

    First determine the image’s purpose, audience, theme, and core information. For example, is it a travel guide, product promotion, knowledge explainer, or event preview? Different purposes require different information density and visual styles.

    Step 2: Structure the Prompt

    Rather than entering only “generate a good-looking cover,” it is better to describe explicitly:

    • Canvas aspect ratio;
    • Main title;
    • Subtitle;
    • Visual subject;
    • Background environment;
    • Color tendency;
    • Text hierarchy;
    • Whether whitespace is needed;
    • Whether numbering or labels should be added.

    Structured prompts help reduce content deviation caused by excessive model improvisation.

    Step 3: Generate a Draft

    The draft is mainly used to verify whether the theme direction, people, and background meet expectations. At this stage, there is no need to over-pursue details. The overall composition and information layout can be checked first.

    Step 4: Iterate on Specific Problems

    If the title is not prominent enough, increase font size, improve contrast, or specify its position. If the body text is too crowded, reduce the amount of text, add whitespace, or adjust the canvas ratio. If people obscure the text, explicitly require the text area to remain clean.

    Step 5: Perform a Usability Check

    Before final output, check Chinese characters, numbers, punctuation, dates, proper nouns, and price information. For content intended for public release, copyright, privacy, and factual accuracy should also be reviewed.

    7. Different Strategies for Commercial Posters and Infographics

    Commercial posters emphasize visual impact and brand memorability. They usually contain less text but have higher requirements for font style, material effects, and composition. Infographics emphasize accuracy, hierarchy, and reading efficiency. They contain more text and must prioritize clarity.

    Therefore, the same prompting approach cannot be used for all image types:

    • Commercial posters should prioritize describing the subject, atmosphere, color, and visual focus;
    • Long-form science explainer graphics should prioritize information structure, paragraph relationships, and reading order;
    • Event promotion images should clearly specify time, place, theme, and call to action;
    • Tutorial images should control text density and retain sufficient margins;
    • Social media covers should place the core title in a highly recognizable area.

    When necessary, a combined workflow of “image generation plus post-layout” can be used: first generate the background, people, and decorative elements, then overlay key text through a layout system. This approach is more reliable in scenarios requiring strong consistency, especially for content that must not contain errors, such as prices, dates, regulatory clauses, and long paragraphs.

    8. Deployment and Cost Control Recommendations

    The actual cost of an image generation service is usually related to resolution, sampling steps, model scale, concurrency, and hardware utilization. To control inference cost, the following strategies can be used:

    1. Generate drafts at low resolution and final outputs at high resolution;
    2. Cache results for identical prompts and parameters;
    3. Preset templates and prompts for high-frequency scenarios;
    4. Dynamically adjust inference configuration based on task complexity;
    5. Improve hardware utilization through batch processing;
    6. Use asynchronous task queues to prevent long tasks from blocking requests;
    7. Set retry limits for failed requests to prevent runaway costs;
    8. Monitor generation latency, failure rate, and resource usage.

    In service architecture, request access, task scheduling, model inference, result storage, and review modules can be decoupled. Object storage can be used to save generated results, message queues can carry asynchronous tasks, and logging and monitoring systems can track failure causes and resource consumption.

    9. Implications for Developers

    The value of training multimodal models on domestic chips lies not only in hardware substitution but also in building complete autonomous training and deployment capabilities. For developers, the following points deserve real attention:

    • Model quality depends on the combined effect of data, algorithms, and engineering systems;
    • Text generation capability requires dedicated data and specialized evaluation;
    • Complex applications should not be judged by a single sample but by batch stability;
    • Cost, latency, concurrency, and maintainability are equally important;
    • For critical text, generative models and traditional layout tools can be used together;
    • Domestic hardware adaptation requires long-term operator optimization, framework development, and engineering accumulation.

    Overall, image generation technology is moving from “showcasing effects” to “production tooling.” Only when a model can stably understand Chinese instructions, generate accurate text, complete reasonable layouts, and provide services at controllable cost does it truly become ready for content production, marketing design, education and publishing, and enterprise office scenarios. Future competition will gradually shift from simply pursuing stunning visuals to content reliability, text accuracy, process controllability, and deployment efficiency.