Training Multimodal Image Generation Models on Domestic AI Chips: An Engineering Practice Guide

    This article examines how engineering teams can run the full training pipeline for a multimodal image generation model on domestic accelerator chips. It explains the autoregressive-plus-diffusion architecture, how arbitrary aspect ratios are enabled at the tokenizer level, a practical approach to Chinese text rendering, and key recommendations for compute, data, and serving. Readers will gain a reusable migration methodology for moving image generation workflows across different compute backends.

    1. Why “Domestic Chips + Image Generation” Became an Engineering Focus

    Over the past two years, the parameter counts and training compute demands of image generation models have kept climbing, while the availability of high-end accelerator cards remains uncertain. This creates a practical problem: how to complete a full, usable training pipeline for a multimodal generation model under constrained compute supply. A recent signal in the industry is that export restrictions on certain high-compute accelerator cards for specific regions have loosened, but such policy shifts only affect expectations around incremental supply. They do not change a long-term trend: engineering teams need the ability to run the entire workflow on domestic accelerator platforms.

    A common misconception needs clarifying: there is no causal relationship between relaxed policies and the release of any particular model. What deserves attention is the engineering fact demonstrated by such releases: a relatively large multimodal generation model completed its entire pipeline—data cleaning, tokenizer training, base pretraining, alignment, and decoder training—on a cluster of domestic accelerator cards. The value of this kind of practice lies in producing a reusable migration methodology, not in any single release itself.

    2. Hybrid Architecture: Autoregression for “Understanding,” Diffusion for “Rendering”

    These models generally adopt a two-stage “autoregressive + diffusion decoder” structure, with clear boundaries between the responsibilities of the two modules.

    The first stage is the autoregressive backbone, typically on the order of billions of parameters, handling semantic understanding, instruction following, and global composition planning. It unifies text and images under the same sequence modeling paradigm, outputting a sequence of discrete or continuous image representations—essentially “figuring out what to draw and how to lay it out” first.

    The second stage is the diffusion decoder, mostly based on DiT-like structures. It takes the representation conditions from the backbone and progressively denoises them back into pixels. It is responsible for “rendering the idea clearly,” especially the reconstruction quality of textures, lighting, and details.

    This division of labor brings three engineering benefits:

    • Stronger semantic controllability. Composition and element relationships are explicitly modeled in the autoregressive stage, reducing the “misplaced elements, wrong counts” issues common in pure diffusion approaches.
    • Trainable in stages. The backbone and decoder can be trained and tuned in separate phases, with memory and parallelism strategies decoupled, making gradient accumulation and checkpoint resume easier on limited clusters.
    • Trimmed for inference. Low-precision scenarios can keep only the backbone for fast composition previews, while high-precision scenarios invoke the decoder, forming continuously adjustable quality-latency tiers.

    The inference call logic can be abstracted schematically as:

    1. # Pseudocode: expresses only call order and condition passing
    2. latent_seq = autoregressive_backbone.encode(prompt) # semantics and composition
    3. image = diffusion_decoder.decode(latent_seq, steps=28) # pixel reconstruction
    4. image = glyph_module.refine(image, prompt) # text region correction

    3. Arbitrary Aspect Ratios: The Problem Is in the Tokenizer, Not the Sampler

    Traditional generation models often limit resolution to a few preset tiers, because positional encoding is tightly coupled with the training resolution distribution. Extrapolating to non-standard sizes easily leads to broken composition and repeated textures.

    The key modification to support arbitrary aspect ratios usually lands in the tokenizer and positional encoding: letting the grid size of image representations scale freely with the target canvas, and mixing samples of various aspect ratios during training so the model has seen “extremely flat” and “extremely long” distributions. Three engineering points need attention:

    1. Area constraints rather than edge constraints. Schedule different ratios by keeping total pixel area approximately constant, avoiding extrapolating the long edge too far.
    2. Biased aspect ratio sampling. In real scenarios, 1:1, 4:3, and 3:4 make up the majority; purely uniform sampling wastes capacity.
    3. Size alignment on the inference side. The target size must be evenly divisible by the tokenizer grid, otherwise padding and cropping are required.

    This capability is directly usable for custom-size scenarios such as posters, social media covers, and e-commerce main images, eliminating the composition loss caused by “generate first, crop later.”

    4. Chinese Text Rendering: Breaking “Tip-of-the-Tongue” into Solvable Subproblems

    Text generation is a high-frequency need in Chinese scenarios and the place where problems surface most easily. A workable approach is to downgrade text rendering from a “pixel generation problem” to a “glyph condition injection problem”: first specify glyphs, strokes, and layout boxes on the text side, then have a dedicated encoding and correction module strengthen text regions during decoding, and finally perform a region-level repaint check. Combined with targeted supplementation of Chinese glyph corpora and layout samples, this can significantly improve missing strokes, wrong characters, and line misalignment.

    5. Deployment Recommendations and Compute Engineering Essentials

    • Training side: Prioritize confirming operator coverage on domestic accelerator cards; attention, normalization, and custom convolutions are often the gaps; trade compute graph fusion and mixed precision for throughput.
    • Data side: Image-text pair quality sets the ceiling; Chinese scenarios need extra layout and glyph annotations.
    • Serving side: Store model weights and training logs in object storage and logging services respectively, delegate task scheduling to a container platform, and track memory usage and queue latency with monitoring and alerts.
    • Cost side: Staged training and checkpoint resume can significantly reduce wasted compute.

    Overall, the significance of running the full image generation pipeline on domestic chips lies not in the parameters or scores of a single release, but in validating a replicable migration path: decouple responsibilities in the architecture, fill distribution gaps in the data, and adapt operators and parallelism in engineering. Mastering these three layers gives teams certainty when migrating across different compute backends.