Training Multimodal Image Generation Models on Domestic Chips: A Full-Pipeline Analysis
This article examines how a multimodal image generation model can be trained end to end on domestic accelerator cards, covering the hybrid autoregressive-plus-diffusion architecture, complex Chinese text rendering, native arbitrary aspect ratios, and system-level optimizations across scheduling, parallelism, and operators. It also outlines a staged rollout path, evaluation dimensions, and risks such as corpus licensing and quality regression, offering practical guidance for teams reproducing or migrating this capability.
1. Why a Full Pipeline on Domestic Chips Deserves Separate Discussion
Over the past year, competition in multimodal image generation has shifted from “can it generate images” to “can it reliably render readable text, controllable layouts, and custom dimensions.” At the same time, diversification of compute supply has become a practical concern for engineering teams. A “full pipeline on domestic chips” does not simply mean porting training scripts to new hardware. It means the entire chain—data preprocessing, large-scale pretraining, supervised fine-tuning, and reinforcement alignment—runs as a closed loop on the same set of domestic accelerators and their supporting frameworks.
This matters for three reasons. First, it validates that non-mainstream acceleration hardware is viable for very large-scale multimodal training, particularly its fault tolerance and recovery during long, stable runs. Second, it pushes the toolchain toward maturity: distributed parallelism strategies, communication-computation overlap, operator fusion, and mixed-precision policies all need to be retuned around hardware characteristics. Third, it offers enterprises a template for co-optimizing “compute, framework, and model,” avoiding the dilemma where model design is bent to fit the hardware while hardware capability is wasted by the framework.
2. A Hybrid Architecture: Separating “Understanding” from “Rendering”
These models typically adopt a hybrid structure of an “autoregressive backbone plus diffusion decoder,” which essentially decouples semantic planning from pixel generation.
- The autoregressive backbone (around ten billion parameters) handles semantic understanding, instruction following, and global composition planning. It outputs a structured intermediate representation, such as scene layout, subject relationships, text content, and placement intent.
- The diffusion decoder (a DiT structure of several billion parameters) reconstructs that intermediate representation into high-quality pixels, reinforced by a dedicated text encoding module that improves glyph and layout stability.
The engineering value of this split is that the semantic layer can be continuously strengthened with mature reasoning and alignment methods from language models, while the rendering layer can iterate independently on resolution, sharpness, and glyph quality without blocking the other. Similar ideas already exist in the industry, where language model reasoning is brought into image generation, often called “cognitive generation.”
Illustrative pseudocode helps clarify the call boundaries:
# Semantic planning: output a structured intermediate representation (layout, subjects, copy, and placement intent)plan = autoregressive_backbone.encode(prompt, reference_image=None)# Rendering decode: intermediate representation + glyph encoding -> pixelsglyph_feat = glyph_encoder.encode(plan.text_segments)image = diffusion_decoder.decode(plan.layout, glyph_feat,width=1240, height=1600)
3. Complex Text Rendering: Challenges and Solutions for Chinese Posters
Rendering Chinese text is significantly harder than rendering Latin characters: glyphs are dense, stroke width varies widely, many characters look alike (the “tip of the tongue” character-recall problem is prominent), and poster scenarios often involve vertical text, stylized lettering, long headlines, and mixed font sizes. Practical engineering solutions usually span four layers:
- Data layer: build high-quality image-text aligned corpora covering fonts, sizes, colors, strokes, shadows, and layout templates, with precise annotation of text regions.
- Representation layer: introduce a glyph-aware encoding module that decouples characters from their visual form, so the model not only gets the semantics right but also “writes them convincingly.”
- Training layer: train in stages, first aligning semantics and layout, then strengthening reconstruction quality in small-font and long-text regions.
- Evaluation layer: reference public benchmarks for complex visual text generation and long-text rendering, supplemented by an internal Chinese test set focused on readability, character error rate, and layout consistency.
In practice, long-text rendering benefits from a “segmented layout plus region constraints” strategy: split long copy into semantic blocks and constrain their bounding boxes to prevent text from crowding into each other.
4. Non-Standard Resolutions: From Preset Ratios to Arbitrary Ratios
Traditional models support only a few preset aspect ratios, yet posters and social media covers often require non-standard sizes. The key to native arbitrary ratios lies in the tokenizer and positional encoding strategy. On one hand, use an encoding scheme that can adaptively chunk and stitch so that different aspect ratios are covered evenly. On the other hand, make the 2D positional representation continuous to reduce semantic drift when generalizing across resolutions.
Practical recommendations:
- Compose first at a size close to the target ratio, then apply a small crop to avoid cutting off the subject.
- Reserve a safe margin around text regions, recommended at no less than 5% of the short side.
- For 2K-class output, use tiled generation with overlapping stitching to control texture discontinuity at the seams.
5. Key Optimizations for the Training Pipeline on Domestic Compute
Training on domestic accelerators and their supporting frameworks requires systematic optimization across three layers: communication, dispatch, and operators.
- Scheduling layer: use dynamic-graph multi-level pipelined dispatch to relieve single-point dispatch bottlenecks and keep instruction supply and execution synchronized across large clusters.
- Parallelism layer: multi-stream parallelism lets communication and computation mask each other, commonly combining data parallelism, tensor parallelism, and pipeline parallelism.
- Operator layer: use hardware-affinity fused operators, such as adaptive moment estimation, exponential moving average, and fusion of normalization and activation, to reduce memory round trips and kernel launch overhead.
- Stability layer: complete checkpoint resume, slow-node isolation, and fault self-healing. Availability over long training cycles often matters more than peak throughput.
For cloud deployment, elastic scheduling can be combined with a container platform, object storage can hold corpora and checkpoints, and logging and monitoring with alerting can track throughput, memory, and communication metrics, forming an observable training loop.
6. Rollout Recommendations and Risks
For teams aiming to reproduce or migrate this capability, proceed in stages: small-scale validation, medium-scale expansion, then full training. First verify data pipeline and operator correctness on small samples, then validate the scaling efficiency of the parallelism strategy, and finally move to full training. For evaluation, do not rely on visual impression alone; establish four dimensions: character error rate, layout consistency, subject fidelity, and dimension compliance. On the risk side, watch for corpus copyright and font licensing, compliance review of generated content, and quality regression across different resolutions. Overall, full-pipeline training on domestic chips has moved from feasibility validation to engineering, and the hybrid architecture plus text rendering optimization will be the core competitive edge of multimodal image generation in the next stage.
