readme: ---
  language: zh
  license: creativeml-openrail-m
  
  tags:
  - stable-diffusion
  - stable-diffusion-diffusers
  - text-to-image
  - bilingual
  - zh
  - Chinese
  - en
  - English
  
  extra_gated_prompt: |-
    This model is open access and available to all, with a CreativeML OpenRAIL-M license further specifying rights and usage.
    The CreativeML OpenRAIL License specifies: 
    1. You can't use the model to deliberately produce nor share illegal or harmful outputs or content 
    2. The authors claim no rights on the outputs you generate, you are free to use them and are accountable for their use which must not go against the provisions set in the license
    3. You may re-distribute the weights and use the model commercially and/or as a service. If you do, please be aware you have to include the same use restrictions as the ones in the license and share a copy of the CreativeML OpenRAIL-M to all your users (please read the license entirely and carefully)
    Please read the full license carefully here: https://huggingface.co/spaces/CompVis/stable-diffusion-license
        
  extra_gated_heading: Please read the LICENSE to access this model
  ---
  
  # AltDiffusion
  
  |  名称 Name   | 任务 Task       |   语言 Language(s)    | 模型 Model    | Github |
  |:----------:| :----:  |:-------------------:| :----:  |:------:|
  | AltDiffusion | 多模态 Multimodal | 中英文 Chinese&English | Stable Diffusion |   [FlagAI](https://github.com/FlagAI-Open/FlagAI)   |
  
  
  ## Gradio
  
  We support a [Gradio](https://github.com/gradio-app/gradio) Web UI to run AltDiffusion:
  [![Open In Spaces](https://camo.githubusercontent.com/00380c35e60d6b04be65d3d94a58332be5cc93779f630bcdfc18ab9a3a7d3388/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f25463025394625413425393725323048756767696e67253230466163652d5370616365732d626c7565)](https://huggingface.co/spaces/BAAI/bilingual_stable_diffusion)
  
  
  #  模型信息 Model Information
  
  我们使用 [AltCLIP](https://github.com/FlagAI-Open/FlagAI/tree/master/examples/AltCLIP/README.md)，基于 [Stable Diffusion](https://huggingface.co/CompVis/stable-diffusion) 训练了双语Diffusion模型，训练数据来自 [WuDao数据集](https://data.baai.ac.cn/details/WuDaoCorporaText) 和 [LAION](https://huggingface.co/datasets/ChristophSchuhmann/improved_aesthetics_6plus) 。
  
  我们的版本在中英文对齐方面表现非常出色，是目前市面上开源的最强版本，保留了原版stable diffusion的大部分能力，并且在某些例子上比有着比原版模型更出色的能力。
  
  AltDiffusion 模型由名为 AltCLIP 的双语 CLIP 模型支持，该模型也可在本项目中访问。您可以阅读 [此教程](https://github.com/FlagAI-Open/FlagAI/tree/master/examples/AltCLIP/README.md) 了解更多信息。
  
  AltDiffusion支持线上演示，点击 [这里](https://huggingface.co/spaces/BAAI/FlagStudio) 在线试玩！
  
  We used [AltCLIP](https://github.com/FlagAI-Open/FlagAI/tree/master/examples/AltCLIP/README.md), and trained a bilingual Diffusion model based on [Stable Diffusion](https://huggingface.co/CompVis/stable-diffusion), with training data from [WuDao dataset](https://data.baai.ac.cn/details/WuDaoCorporaText) and [LAION](https://huggingface.co/datasets/laion/laion2B-en).
  
  Our model performs well in aligning Chinese and English, and is the strongest open source version on the market today, retaining most of the stable diffusion capabilities of the original, and in some cases even better than the original model.
  
  AltDiffusion model is backed by a bilingual CLIP model named AltCLIP, which is also accessible in FlagAI. You can read [this tutorial](https://github.com/FlagAI-Open/FlagAI/tree/master/examples/AltCLIP/README.md) for more information. 
  
  AltDiffusion now supports online demo, try out it by clicking [here](https://huggingface.co/spaces/BAAI/FlagStudio)!
  
  
  ## 引用
  关于AltCLIP，我们已经推出了相关报告，有更多细节可以查阅，如对您的工作有帮助，欢迎引用。
  
  If you find this work helpful, please consider to cite
  ```
  @article{https://doi.org/10.48550/arxiv.2211.06679,
    doi = {10.48550/ARXIV.2211.06679},
    url = {https://arxiv.org/abs/2211.06679},
    author = {Chen, Zhongzhi and Liu, Guang and Zhang, Bo-Wen and Ye, Fulong and Yang, Qinghong and Wu, Ledell},
    keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences},
    title = {AltCLIP: Altering the Language Encoder in CLIP for Extended Language Capabilities},
    publisher = {arXiv},
    year = {2022},
    copyright = {arXiv.org perpetual, non-exclusive license}
  }
  ```
  
  # 模型权重 Model Weights
  
  第一次运行AltDiffusion模型时会自动从 [这里](https://model.baai.ac.cn/model-detail/100076)  下载如下权重,  
  
  The following weights are automatically downloaded from [here](https://model.baai.ac.cn/model-detail/100076) when the AltDiffusion model is run for the first time: 
  
  | 模型名称 Model name              | 大小 Size | 描述 Description                                        |
  |------------------------------|---------|-------------------------------------------------------|
  | StableDiffusionSafetyChecker | 1.13G   | 图片的安全检查器；Safety checker for image                     |
  | AltDiffusion                 | 8.0G    | 我们的双语AltDiffusion模型； Our bilingual AltDiffusion model |
  | AltCLIP                      | 3.22G   | 我们的双语AltCLIP模型；Our bilingual AltCLIP model            |
  
  
  # 示例 Example
  
  ##  🧨Diffusers Example
  
  **AltDiffusion** 已被添加到 🧨Diffusers! 
  
  我们