Favicon of CogView4

CogView4

A local text-to-image model that accepts Chinese and English prompts, renders Chinese text, and works with Hugging Face Diffusers.

CogView4 is a text-to-image model for image creators and developers who want to generate images on their own hardware. It accepts Chinese and English descriptions and can include Chinese text in the results.

  • Detailed prompts: The GLM-4-9B text encoder accepts long descriptions for specifying subjects, attributes and relationships within an image.
  • Image shapes: Generate square or rectangular images within the model's resolution and total image-size limits.
  • Generation interfaces: Use the model through Hugging Face Diffusers or a Gradio browser interface.
  • Lower memory use: CPU offloading and BNB or TorchAO quantization provide ways to reduce memory demands.
  • Custom training: CogKit and finetrainers support LoRA and full fine-tuning; finetrainers supports training on a single RTX 4090.

The repository is open source under Apache 2.0. Local inference runs on your hardware, while Hugging Face Spaces, ModelScope Spaces and ZhipuAI MaaS provide hosted alternatives. The model supports BF16 and FP32 inference. Fine-tuning uses separate frameworks rather than training code included in this repository.

Similar to CogView4