UnicomAI commited on
Commit
904e36a
·
verified ·
1 Parent(s): f46b53a

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +57 -3
README.md CHANGED
@@ -1,3 +1,57 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ ---
4
+ # UniT2IXL
5
+
6
+ <p align="center">
7
+ <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>
8
+ </p>
9
+
10
+ <figure>
11
+ <img src="imgs/pic.png">
12
+ </figure>
13
+
14
+ <br>
15
+
16
+ ## 📖 介绍
17
+ UniT2IXL是由中国联通AI创新中心团队开发的一款基于潜在扩散的大规模文本到图像生成模型。该模型改进了SDXL的编码器,采用中文CLIP实现对原生中文的支持,并引入mt5架构提升对长文本的理解能力。在国产昇腾AI基础软硬件平台实现了模型从微调训练到推理的一体化适配
18
+ <p style="text-align: center;">
19
+ <img src="imgs/unit2ixl.png" width="400"/>
20
+ </p>
21
+
22
+
23
+
24
+
25
+ ## 🚀 快速开始
26
+ ### 环境依赖
27
+
28
+ * Python 3.8 or later
29
+ * PyTorch 2.4.0 or later
30
+ * Transformers 4.43.3 or later
31
+ * Diffusers 0.31.0
32
+ * Recommended: CUDA 11.7 or later
33
+ <br>
34
+
35
+ 1. 快速安装
36
+
37
+ ```bash
38
+ git clone https://github.com/UnicomAI/UniT2IXL.git
39
+ cd UniT2IXL
40
+ conda create -n unit2i python=3.10
41
+ conda activate unit2ixl
42
+ cd unit2ixl
43
+ pip install -r requirements.txt
44
+ ```
45
+ 2. 权重下载([link](https://huggingface.co/UnicomAI/UniT2IXL)):
46
+ ```bash
47
+ huggingface-cli download --resume-download UnicomAI/UniT2IXL
48
+ ```
49
+
50
+ 3. 推理`demo.py`:
51
+ ```bash
52
+ from pipline_unit2ixl import UniT2IXLPipeline
53
+ pipline = UniT2IXLPipeline.from_pretrained("UnicomAI/UniT2IXL")
54
+ pipline = pipline.to("cuda:0")
55
+ prompt = "在绿色的森林中,隐藏着一座白色的哥特式教堂,教堂的尖塔直指蓝色的天空,教堂周围是五彩斑斓的野花和浅黄色的草坪。"
56
+ image = pipline(prompt=prompt,guidance_scale=7.5,target_size=(1024,1024)).images[0]
57
+ ```