CogView3: Finer and Faster Text-to-Image Generation via Relay Diffusion

Wendi Zheng, Jiayan Teng, Zhuoyi Yang, Weihan Wang, Jidong Chen, Xiaotao Gu, Yuxiao Dong, Ming Ding, Jie Tang · DOI

Introduction

The field of text-to-image (T2I) generation has seen rapid advancement, yet the computational demand for high-resolution images remains a significant hurdle. Direct generation at resolutions like 1024x1024 is resource-intensive, as every denoising step occurs at full resolution. While cascaded models—which generate a low-resolution base and then upscale it—offer a potential solution, they often suffer from error accumulation and complex training requirements. CogView3 introduces a novel framework based on "Relay Diffusion" to address these bottlenecks, delivering high-quality images with superior efficiency.

The Relay Diffusion Framework

The core innovation of CogView3 is the implementation of Relay Diffusion in the latent space. Traditional cascaded models typically use the low-resolution output as a constant condition for the super-resolution stage. This often results in the second stage merely sharpening the errors of the first, a phenomenon known as error accumulation.

CogView3 breaks this cycle by starting the second stage from a blurred, noisy version of the low-resolution output. This "relay" mechanism allows the model to "rectify" artifacts from the base stage:

  1. Base Stage: The model first generates a 512x512 image in the latent space.
  2. Relay Stage: The model performs 2x super-resolution to reach 1024x1024. Unlike traditional upscalers, this stage doesn't start from pure noise. Instead, it begins at an intermediate point in the diffusion schedule using a linear blurring schedule.
  3. Iterative Scaling: This process can be applied iteratively to reach 2048x2048 or higher resolutions.

By starting the second stage with a noisy version of the first stage's output, the model retains the structural guidance of the base image while possessing enough "freedom" to modify pixels. This allows it to fix structural errors or hallucinations that a standard upscaler would be forced to preserve.

Enhancing Data and Prompts

CogView3 emphasizes that the quality of text-image alignment is heavily dependent on the quality of training captions. Following the precedent set by models like DALL-E 3, the authors utilized a CogVLM-based model to "re-caption" 95% of the Laion-2B dataset. These descriptive, accurate captions provide the model with a much richer understanding of visual concepts than the original noisy web-scraped data.

Furthermore, CogView3 employs a "Prompt Expansion" LLM at inference time. This component transforms simple user queries into detailed, descriptive prompts, ensuring the model has sufficient context to generate high-fidelity results that align precisely with user intent.

Performance and Efficiency

To optimize for real-world applications, the researchers applied progressive distillation. This technique compresses the multi-step diffusion process into significantly fewer steps without a massive loss in quality.

The computational savings are largely quadratic. Because the majority of the denoising work happens at the 512x512 resolution, the total compute cost is drastically lower than models that operate exclusively at 1024x1024. Key results include:

  • Human Evaluation: CogView3 achieved a 77.0% win rate against SDXL in human preference tests for both aesthetic quality and prompt alignment.
  • Inference Speed: The standard CogView3 is roughly 2x faster than SDXL.
  • CogView3-distill: This version achieves comparable quality to SDXL but is 10x faster, capable of generating a 1024x1024 image in approximately 1.5 seconds on a batch size of 4.

Limitations and Future Work

While the relay method is highly efficient, generating extremely high resolutions (4096px and beyond) still encounters CUDA memory limits. To manage this, the authors utilize "tiled diffusion," which can occasionally introduce boundary artifacts. Additionally, while the distilled model is incredibly fast, there remains a slight drop in fine-grained aesthetic detail compared to the full 50+10 step version. Future work will focus on optimizing tiled inference for seamless integration and exploring even higher resolution outputs.

Conclusion

CogView3 demonstrates that relay diffusion is a powerful alternative to traditional cascaded or direct high-resolution generation. By allowing the super-resolution stage to refine and correct the base stage's output, it achieves a new state-of-the-art in the balance between speed and image quality, outperforming existing models like SDXL in both preference and performance.

Summary updated

BibTeX
@inproceedings{zheng2024cogview,
  author = {Wendi Zheng and Jiayan Teng and Zhuoyi Yang and Weihan Wang and Jidong Chen and Xiaotao Gu and Yuxiao Dong and Ming Ding and Jie Tang},
  title = {{CogView3: Finer and Faster Text-to-Image Generation via Relay Diffusion}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-72980-5\_1},
}
Figure