---
title: UniT2IXL
canonical_url: "https://www.modelscope.cn/models/UnicomAI/UniT2IXL"
md_url: "https://www.modelscope.cn/models/UnicomAI/UniT2IXL.md"
repository: UnicomAI/UniT2IXL
last_updated: 2024-12-26
license: "Apache License 2.0"
pipeline_tag: text-to-image-synthesis
tasks:
  - text-to-image-synthesis
parameters: 4.7B
tensor_type:
  - F32
library_name:
  - safetensors
  - diffusers
  - pytorch
frameworks:
  - Pytorch
downloads: 277
stars: 7
---

# UniT2IXL

> UniT2IXL - UnicomAI 在 ModelScope 开源的模型。Hugging Face &nbsp;&nbsp; ModelScope &nbsp;&nbsp; WiseModel &nbsp;&nbsp; github

UnicomAI/UniT2IXL 是 ModelScope 魔搭社区上的 4.7B 参数text-to-image-synthesis模型，采用 Apache License 2.0 许可。

- **Repository**: UnicomAI/UniT2IXL
- **License**: Apache License 2.0
- **Tasks**: text-to-image-synthesis
- **Parameters**: 4.7B
- **Downloads**: 277
- **Stars**: 7
- **Last updated**: 2024-12-26

Source: https://www.modelscope.cn/models/UnicomAI/UniT2IXL

---

# UniT2IXL

<p align="center">
    <a href="https://huggingface.co/UnicomAI/UniT2IXL">Hugging Face</a>&nbsp;&nbsp;<a href="https://www.modelscope.cn/UnicomAI/UniT2IXL">ModelScope</a>&nbsp;&nbsp; <a href="https://www.wisemodel.cn/models/UnicomAI/UniT2IXL">WiseModel</a>&nbsp;&nbsp;<a href="https://github.com/UnicomAI/UniT2IXL.git">github</a>
</p>

<figure>
  <img src="imgs/pic.png">
</figure>

<br>

## 📖 介绍
UniT2IXL是由中国联通AI创新中心团队开发的一款基于潜在扩散的大规模文本到图像生成模型。该模型改进了SDXL的编码器，采用中文CLIP实现对原生中文的支持，并引入mt5架构提升对长文本的理解能力。在国产昇腾AI基础软硬件平台实现了模型从微调训练到推理的一体化适配
<p style="text-align: center;">
      <img src="imgs/unit2ixl.png" width="400"/>
</p>




## 🚀 快速开始
### 环境依赖

* Python 3.8 or later
* PyTorch 2.4.0 or later
* Transformers 4.43.3 or later
* Diffusers 0.31.0
* Recommended: CUDA 11.7 or later
<br>

1. 快速安装

```bash
git clone https://github.com/UnicomAI/UniT2IXL.git
cd UniT2IXL
conda create -n unit2i python=3.10
conda activate unit2ixl
cd unit2ixl
pip install -r requirements.txt
```
2. 权重下载：
`SDK下载
```bash
#安装ModelScope
pip install modelscope
```
```python
#SDK模型下载
from modelscope import snapshot_download
model_dir = snapshot_download('UnicomAI/UniT2IXL')
```

3. 推理`demo.py`：
```bash
from pipline_unit2ixl import UniT2IXLPipeline
pipline = UniT2IXLPipeline.from_pretrained(model_dir)
pipline = pipline.to("cuda:0")
prompt = "在绿色的森林中，隐藏着一座白色的哥特式教堂，教堂的尖塔直指蓝色的天空，教堂周围是五彩斑斓的野花和浅黄色的草坪。"
image = pipline(prompt=prompt,guidance_scale=7.5,target_size=(1024,1024)).images[0]
