Open-Source Image Generation Model: Insights into Training on Chinese AI Chips and Native Chinese Text Rendering

    This article explores a recently open-sourced image generation model trained end-to-end on Chinese AI accelerator chips. It details the full-stack training optimizations, a hybrid architecture combining autoregressive planning with diffusion decoding, native Chinese text rendering capabilities, and native support for non-standard resolutions. The article also provides practical engineering advice for production deployment.

    From Inference to Training: A Key Leap for Chinese AI Compute

    In the field of generative AI, the ability to run inference on domestic Chinese chips is no longer rare, but “full-process training” remains a much more rigorous validation. Training an image-text generation model—especially starting from massive data preprocessing and continuously completing large-scale pre-training, supervised fine-tuning, and reinforcement learning—requires systematic refinement of compute clusters, distributed communication, operator implementation, and data pipelines. The technical details disclosed by this open-source model show that its training chain, from data preprocessing to large-scale pre-training, runs entirely on clusters of Chinese AI accelerator cards. This means that previously easily overlooked stages, such as front-end framework adaptation, operator optimization, and model parallelism strategies, can now run completely in a Chinese AI compute environment.

    Recent adjustments in the supply policies of high-end accelerator cards have indeed provided the industry with more choices. However, from a long-term perspective, model training cannot rely on a single supply source. Building the entire training chain on a controllable compute foundation not only reduces supply chain risks but also allows algorithm teams to evolve their software capabilities in tandem with chip iterations. This is why “fully localized training” has greater industrial reference value than merely releasing a model.

    Training Efficiency: Bottlenecks Beyond Compute

    When training large models on Chinese AI chips, the key is not the peak compute power of a single card, but the effective utilization rate of the cluster. Several engineering optimizations in this model’s training approach are worth noting for developers:

    1. Dynamic graph multi-level pipeline dispatch. Dynamic graph training is flexible, but when operators are dispatched to the device one by one, the CPU can become a bottleneck. Multi-level pipelining splits operator preparation, data transfer, and computation execution into multiple stages, ensuring the device waits as little as possible for instructions, thereby reducing dispatch overhead.
    2. Multi-stream parallelism, computation and communication overlap. In large-scale training, the communication overhead of gradient synchronization is significant. By placing computation tasks and communication tasks into different execution streams, the communication time overlaps with computation time, which significantly reduces cluster idle time.
    3. Operator fusion and memory optimization. For high-frequency operations like optimizer updates and normalization, fused implementations better suited to the chip’s instruction set are adopted. For example, weight decay, momentum updates, and moving averages are merged into a single update to reduce kernel launch counts and memory access. Such optimizations are not single-point magic; they require close collaboration between algorithm engineers and the underlying compilation/operator teams.

    From the data perspective, full-process localization also means that data cleaning, image-text pair construction, OCR annotation, and image encoding modules must all adapt to the new hardware and framework. Multimodal data preprocessing typically involves a large number of image decoding, cropping, scaling, and text tokenization operations, which also require efficient parallelization. Only by simultaneously optimizing the data pipeline, training scheduling, and model structure can the compute power of Chinese AI chips be truly transformed into model performance.

    Hybrid Architecture: Autoregressive Planning Plus Diffusion Decoding

    Instead of choosing a purely autoregressive or purely diffusion-based route, the model adopts a combination of the two generation paradigms:

    • The autoregressive module is responsible for “thinking clearly.” It understands the semantics, object relationships, and layout structure in the user’s prompt to generate high-level planning information. For commercial posters, this module acts more like a “layout designer,” deciding where to place the title, what the main visual is, and how to organize the text content.
    • The diffusion decoder is responsible for “rendering finely.” It receives the high-level plan and generates pixel-level images through multi-step denoising. Diffusion models have strong capabilities in depicting light, shadow, materials, and textures, but for discrete symbols—especially Chinese characters—they easily generate pseudo-text that “looks like text but is unreadable.” Therefore, the decoder couples glyph condition information during the generation process, explicitly passing “what text to write” to the generation process.

    This combined approach is often referred to in the industry as “cognitive generation”: the model understands before generating, rather than blindly drawing from random noise. Compared to a single model, the two-stage architecture increases inference overhead but yields better semantic consistency and text controllability. For scenarios requiring precise layouts, this trade-off is worthwhile.

    1. # Two-stage generation schematic: understanding first, rendering second
    2. semantic_plan = autoregressive_generate(prompt)
    3. image_latent = diffusion_decode(
    4. semantic_plan,
    5. glyph_hint=extract_glyph_sequence(prompt),
    6. target_size=(1240, 1600)
    7. )
    8. final_image = pixel_decoder(image_latent)

    Chinese Text Rendering: From “Looks Like Text” to “Readable”

    Chinese text rendering is one of the most difficult breakthroughs in multimodal generation. The reason is intuitive: the number of Chinese characters is large, the stroke structures are complex, and the glyphs are highly similar. If a model simply learns text as image texture, it can easily create symbols that “look like Chinese characters but do not actually exist.” Especially when generating long text, it is also necessary to handle character spacing, line spacing, and the hierarchical relationship between titles and body text, further complicating the problem.

    The model focuses on optimizing two types of capabilities:

    1. Complex visual text generation. Generating multiple text regions within a single image while keeping the content correct and positions natural. This is critical for posters, slides, and cover designs.
    2. Long text rendering. Accommodating a large amount of text within a limited resolution while ensuring readability. Evaluation scenarios typically include comprehensive layout tasks such as titles, subtitles, body descriptions, and data annotations.

    In public evaluations, the model ranks among the top open-source models for tasks related to complex visual text generation and long-text rendering. This shows that through explicit glyph constraints, high-quality image-text pair data, and a two-stage architecture, native Chinese text generation has moved from “demo-level” to “usable-level.”

    Non-Standard Resolutions: Breaking Preset Aspect Ratio Limits

    Traditional image generation models typically only output fixed aspect ratios, such as 4:3 or 16:9. In actual business scenarios, posters, social media covers, and product detail images often require custom dimensions. If a model can only generate standard ratios, developers must crop or scale, which can easily destroy the composition or stretch the text.

    By improving the Tokenizer strategy, this model natively supports more non-standard dimensions, such as 1240×1600, an aspect ratio that is neither standard landscape nor standard portrait. During generation, the target width and height can be specified directly, allowing the model to work within a scale range covering 1024 to 2048 pixels, rather than assuming a fixed square latent and doing post-processing.

    This provides direct value to application developers: there is no need to prepare multiple sets of generation templates for different distribution channels, nor to repeatedly crop to fit dimensions. The model has seen a continuously changing resolution distribution during the training phase, making it friendlier to composition ratios and less likely to blur text regions due to scaling.

    Open Source and Engineering Deployment Recommendations

    The model weights and inference code have been open-sourced. Developers can access them through the public model repository for secondary training, private deployment, or workflow integration. More importantly, open source means the model details are verifiable and auditable, which is crucial for data-sensitive enterprises.

    For actual deployment, here are a few engineering recommendations:

    • Write layout intent into prompts. Do not just write “generate a poster.” Specify the main title, subtitle, color scheme, and layout direction, such as “title centered, main visual on the right, two lines of explanatory text at the bottom.” Clear layout descriptions can significantly improve the stability of text placement.
    • Generate directly at the target size whenever possible. If the target size is 1240×1600, generate at that size; do not generate at 1024×1024 first and then scale. Scaling will damage text edges and line sharpness.
    • Add an OCR verification step for scenarios with high text accuracy requirements. After the model outputs, use OCR to extract the text in the image and compare it with the prompt. If typos or missing characters are found, trigger a regeneration. This is a cost-effective and highly visible fallback solution.
    • Evaluate compute costs carefully. Two-stage generation is more time-consuming than single-model inference. In production environments, it is necessary to combine batch processing, caching, and task prioritization to control response time and costs.

    Conclusion: The Triple Resonance of Compute, Architecture, and Product Requirements

    The significance of this open-source image generation model lies not just in adding another usable image generation tool, but in validating a complete technical path: Chinese AI compute can support the full closed-loop of large models from data to pre-training and alignment training. Meanwhile, the hybrid architecture of autoregressive planning and diffusion decoding provides a reference implementation paradigm for “decoupling understanding and rendering.” The optimizations in non-standard resolutions and Chinese text rendering indicate that product requirements must be factored into model design at an early stage, rather than trying to remedy them after the model is trained.

    For developers, when choosing an image generation model, one cannot just look at the generated effect images. More attention should be paid to: how training data is constructed, whether the model supports the sizes required by the business, whether text rendering is directly readable, and whether the training and inference chains are controllable. It is these engineering details that determine whether the technology can truly enter a production environment.