Training Multimodal Text-to-Image Models on Domestic AI Chips: Technical Approaches and Practice

    In recent years, image generation has shifted from simply producing pictures to accurately understanding complex instructions and reliably rendering usable text-and-image content. This article examines a hybrid architecture combining autoregressive semantic planning with diffusion-based image decoding, explains why Chinese text rendering remains difficult, and walks through the full engineering pipeline for training such models on domestic AI accelerators—from data preprocessing and pretraining to instruction tuning, operator optimization, and evaluation for non-standard resolutions. Developers will find practical guidance on data quality, training frameworks, performance baselines, and deployment best practices.

    The competitive focus of image generation models has gradually shifted from “can it generate an image” to “can it accurately understand complex instructions and stably produce ready-to-use text-and-image content.” In scenarios such as commercial posters, infographic long images, educational illustrations, and social media covers, users demand not only visually appealing output but also correct text, reasonable layouts, flexible dimensions, and compatibility with domestic compute environments.

    Against this backdrop, a notable technical路线 is emerging: completing the entire training workflow of a multimodal image generation model on domestic accelerator chips—covering data preprocessing, pretraining, instruction fine-tuning, and reinforcement-based optimization—using a hybrid architecture of “autoregressive modeling + diffusion-based image decoding” to strengthen the model’s combined handling of semantics, composition, and text.

    1. Why Text Rendering Remains Difficult

    Traditional text-to-image models are typically good at generating natural scenes, people, and abstract styles, but they often produce typos, garbled characters, missing strokes, and messy typography. This is not merely a data quantity problem—it is rooted in the image generation mechanism itself.

    For natural images, slight variations in local texture rarely affect the overall appearance. For text, however, a single stroke, radical, or even a change in character spacing can completely alter meaning. An error in one character of a poster title, for example, can directly make the content unusable. Text rendering therefore requires a model to simultaneously:

    1. Correctly understand the text content the user inputs;
    2. Recognize different fonts, font sizes, and typographic relationships;
    3. Handle horizontal, vertical, multi-line, and mixed-language layouts;
    4. Maintain visual hierarchy between text, background, and main subjects;
    5. Keep character structures stable across different resolutions.

    This means relying solely on pixel-level diffusion is suboptimal. The model needs a stronger language understanding module to first determine “what should appear in the image,” and then let an image decoding module handle “how to draw it.”

    2. A Hybrid Architecture: Autoregressive Planning + Diffusion Decoding

    A reasonable design splits the system into two cooperating modules.

    2.1 Autoregressive Module: Semantic Understanding and Overall Planning

    The autoregressive module acts as a “visual content planner.” Based on text prompts, reference images, or other multimodal inputs, it analyzes user intent and produces a high-level representation covering:

    • Main subjects and their positions;
    • Foreground, background, and spatial relationships;
    • Text content and its hierarchy;
    • Color, style, and compositional direction;
    • Interactions among multiple objects.

    This type of module is better suited to sequential information and logical relationships. For example, when a user requests a poster with “title on top, product in the middle, description text at the bottom,” the autoregressive component can first establish the overall layout and then pass it to the image decoder.

    2.2 Diffusion Decoding Module: Detail Generation and Visual Fidelity

    The diffusion decoder is better suited to generating continuous visual information—color, texture, lighting, edges, and fine details. It progressively reconstructs the final image from the semantic representation produced in the previous stage.

    For text-heavy scenarios, a dedicated glyph encoding module can be added, feeding character structures, stroke relationships, and text layout as additional conditions. The core value here is that text is no longer treated as ordinary texture within the image, but as a visual object with explicit structural constraints.

    In short, the autoregressive module “reads and plans,” the diffusion decoder “draws and renders,” and the glyph encoder “writes accurately.” Working together, the three are well suited to complex posters and mixed text-and-image layouts.

    3. Engineering Challenges of Full-Pipeline Training on Domestic Chips

    Training a model on domestic accelerator chips is not simply porting a training script to another hardware environment. Training frameworks, operator implementations, communication mechanisms, memory management, and scheduling all require adaptation.

    3.1 Data Preprocessing Is the Foundation of Training Quality

    Data processing for image-and-text generation models typically includes image cleaning, text filtering, size normalization, text region annotation, and quality scoring. For poster-type data, additional attention is needed on:

    • Whether images contain low-quality or garbled text;
    • Whether text matches image content;
    • Whether titles, body text, and decorative text can be distinguished;
    • Whether images are duplicated, carry copyright risks, or are over-compressed;
    • Whether different aspect ratios are balanced in distribution.

    Without effective filtering at the preprocessing stage, the model may learn incorrect character structures, low-quality layouts, or even meaningless character combinations. In practice, teams should establish data quality scoring, duplicate detection, and anomalous-sample feedback loops, and track Chinese characters, digits, punctuation, and special symbols separately.

    3.2 The Training Framework Must Cover the Full Pipeline

    A mature training system should support more than pretraining—it should also cover supervised fine-tuning, preference optimization, evaluation, and deployment validation. A complete pipeline typically looks like this:

    1. Raw data
    2. ↓
    3. Cleaning and annotation
    4. ↓
    5. Image-text pairing and resolution bucketing
    6. ↓
    7. Large-scale pretraining
    8. ↓
    9. Instruction fine-tuning
    10. ↓
    11. Targeted optimization for text and composition
    12. ↓
    13. Manual or automated evaluation
    14. ↓
    15. Inference deployment and feedback loop

    Resolution bucketing is particularly important. Batching data with similar aspect ratios and resolutions reduces wasted padding, lowers compute waste, and improves training stability.

    3.3 Operator and Communication Optimization Directly Affect Efficiency

    In large model training, data movement and communication often become bottlenecks. Optimization directions include:

    • Multi-level pipelined scheduling to reduce task dispatch waiting;
    • Running compute, communication, and data preparation in parallel where possible;
    • Fusing operations such as normalization, optimizer updates, and weight averaging;
    • Using mixed precision to reduce memory footprint;
    • Applying dynamic batching for long sequences and high-resolution samples;
    • Using checkpoints and incremental saving to lower failure recovery costs.

    These optimizations are not specific to any one chip—they are common engineering concerns for large-scale training on domestic compute environments.

    4. The Practical Value of Non-Standard Resolutions

    Traditional generative models are usually trained and evaluated around a few fixed sizes, such as square images or common landscape ratios. But real-world business requirements are more varied:

    • E-commerce and promotional materials need vertical long images;
    • Mobile covers require specific aspect ratios;
    • Feed ads must match different platform sizes;
    • Display screens and digital signage may use ultra-wide layouts;
    • Print content demands higher resolution and stricter margins.

    If a model supports only a limited set of preset sizes, users must generate an image first and then crop or pad it to fit—often resulting in cropped subjects, misplaced text, and distorted proportions.

    A more flexible approach is to introduce dynamic size strategies at the image encoding and decoding stages, using positional encodings, size conditioning, and resolution bucketing so the model can adapt to arbitrary width-height combinations within a certain range. Note that “supporting any ratio” does not mean all sizes achieve equal quality. Extremely narrow or elongated canvases can still make subject layout difficult, so the application layer should provide size validation, safe margins, and composition suggestions.

    5. Evaluation Must Go Beyond Visual Similarity

    For general image generation, visual appeal and text-image alignment are key metrics. For text posters, additional dimensions are needed:

    1. Text accuracy: Does the generated text match user input?
    2. Long-text retention: Are multi-line texts complete and correctly positioned?
    3. Layout rationality: Are titles, body text, and decorative elements clearly layered?
    4. Visual readability: Is there sufficient contrast between text and background?
    5. Resolution stability: Does text remain sharp when the canvas ratio changes?
    6. Semantic consistency: Does the image subject match the prompt?
    7. Style stability: Do multiple generations maintain a similar visual direction?

    Automated evaluation can combine OCR, region detection, and image-text matching models, but in commercial design scenarios, human review remains partially irreplaceable. A more reasonable approach is a combined mechanism of “automated metric screening + manual sampling + online feedback.”

    6. Practical Recommendations for Developers

    If you want to build similar capabilities within an organization, consider these steps:

    First, prioritize a clear application scenario rather than trying to cover every image type from day one. Start with a single scenario such as posters, event covers, or educational cards.

    Second, build a high-quality image-text dataset. The focus should not be simply increasing sample count, but ensuring reliable correspondence between text content, image layout, and size information.

    Third, evaluate semantic planning, image generation, and text rendering separately. This makes it easy to pinpoint whether a problem comes from language understanding, overall composition, or character rendering.

    Fourth, establish performance baselines for the domestic compute environment, recording per-device throughput, memory usage, communication wait times, failure recovery time, and inference latency—don’t focus only on training speed.

    Fifth, add content safety, text verification, and manual editing capabilities at the deployment stage. Generative systems should not be designed as untouchable black boxes; users should be able to edit titles, replace local text, adjust canvas size, and regenerate specific regions.

    Conclusion

    The value of training multimodal image generation models on domestic chips lies not only in “whether the model can be trained,” but in whether a self-reliant, complete, and continuously optimizable technical system can be established. From data processing to training frameworks, from operator adaptation to model architecture, to Chinese text rendering and non-standard resolution support, every stage affects final usability.

    The hybrid route of “autoregressive semantic planning + diffusion image decoding” provides a clearer division of labor for complex text-and-image generation, while full-pipeline optimization around domestic compute lays the engineering foundation for future model iteration, industry deployment, and scaled application. For developers, what truly matters is not any single model release, but how to integrate language understanding, visual generation, text layout, and compute adaptation into a stable, reliable production system.