Update README
Browse files- README.md +13 -10
- README_CN.md +14 -6
README.md
CHANGED
@@ -11,8 +11,6 @@ tags:
|
|
11 |
pipeline_tag: text-to-image
|
12 |
extra_gated_eu_disallowed: true
|
13 |
---
|
14 |
-
|
15 |
-
|
16 |
[中文阅读](./README_CN.md)
|
17 |
|
18 |
<p align="center">
|
@@ -36,6 +34,9 @@ extra_gated_eu_disallowed: true
|
|
36 |
<a href=https://x.com/TencentHunyuan target="_blank"><img src=https://img.shields.io/badge/Hunyuan-black.svg?logo=x height=22px></a>
|
37 |
</div>
|
38 |
|
|
|
|
|
|
|
39 |
|
40 |
-----
|
41 |
|
@@ -199,10 +200,13 @@ From the results, HunyuanImage 2.1 achieved a relative win rate of -1.36% agains
|
|
199 |
|
200 |
**Hardware and OS Requirements:**
|
201 |
- NVIDIA GPU with CUDA support.
|
202 |
-
- **Minimum:**
|
|
|
|
|
|
|
|
|
203 |
- Supported operating system: Linux.
|
204 |
|
205 |
-
> **Note:** The memory requirements above are measured with model CPU offloading enabled. If your GPU has sufficient memory, you may disable offloading for improved inference speed.
|
206 |
|
207 |
## 🛠️ Dependencies and Installation
|
208 |
|
@@ -223,7 +227,6 @@ pip install flash-attn==2.7.3 --no-build-isolation
|
|
223 |
The details of download pretrained models are shown [here](checkpoints-download.md).
|
224 |
|
225 |
## 🔑 Usage
|
226 |
-
|
227 |
HunyuanImage-2.1 only supports 2K image generation (e.g. 2048x2048 for 1:1 images, 2560x1536 for 16:9 images, etc.).
|
228 |
Generating images with 1K resolution will result in artifacts.
|
229 |
Additionally, we recommend using the full generation pipeline for better quality (i.e. enabling prompt enhancement and refinment).
|
@@ -250,9 +253,9 @@ image = pipe(
|
|
250 |
width=2048,
|
251 |
height=2048,
|
252 |
use_reprompt=True, # Enable prompt enhancement
|
253 |
-
use_refiner=True,
|
254 |
# For the distilled model, use 8 steps for faster inference.
|
255 |
-
# For the non-distilled model, use 50 steps for better quality
|
256 |
num_inference_steps=8 if "distilled" in model_name else 50,
|
257 |
guidance_scale=3.5,
|
258 |
shift=5,
|
@@ -283,9 +286,9 @@ We would like to thank the following open-source projects and communities for th
|
|
283 |
## Github Star History
|
284 |
<a href="https://star-history.com/#Tencent-Hunyuan/HunyuanImage-2.1&Date">
|
285 |
<picture>
|
286 |
-
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=Tencent-Hunyuan/HunyuanImage-2.1&type=
|
287 |
-
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=Tencent-Hunyuan/HunyuanImage-2.1&type=
|
288 |
-
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=Tencent-Hunyuan/HunyuanImage-2.1&type=
|
289 |
</picture>
|
290 |
</a>
|
291 |
|
|
|
11 |
pipeline_tag: text-to-image
|
12 |
extra_gated_eu_disallowed: true
|
13 |
---
|
|
|
|
|
14 |
[中文阅读](./README_CN.md)
|
15 |
|
16 |
<p align="center">
|
|
|
34 |
<a href=https://x.com/TencentHunyuan target="_blank"><img src=https://img.shields.io/badge/Hunyuan-black.svg?logo=x height=22px></a>
|
35 |
</div>
|
36 |
|
37 |
+
<p align="center">
|
38 |
+
👋 Join our <a href="assets/WECHAT.md" target="_blank">WeChat</a>
|
39 |
+
</p>
|
40 |
|
41 |
-----
|
42 |
|
|
|
200 |
|
201 |
**Hardware and OS Requirements:**
|
202 |
- NVIDIA GPU with CUDA support.
|
203 |
+
- **Minimum requrement for now:** 36 GB GPU memory for 2048x2048 image generation.
|
204 |
+
|
205 |
+
> ✨ An FP8-quantized model is coming soon, enabling even lower GPU memory requirements for inference, stay tuned 👀!
|
206 |
+
|
207 |
+
> **Note:** The memory requirements above are measured with model CPU offloading enabled. If your GPU has sufficient memory, you may disable offloading for improved inference speed.
|
208 |
- Supported operating system: Linux.
|
209 |
|
|
|
210 |
|
211 |
## 🛠️ Dependencies and Installation
|
212 |
|
|
|
227 |
The details of download pretrained models are shown [here](checkpoints-download.md).
|
228 |
|
229 |
## 🔑 Usage
|
|
|
230 |
HunyuanImage-2.1 only supports 2K image generation (e.g. 2048x2048 for 1:1 images, 2560x1536 for 16:9 images, etc.).
|
231 |
Generating images with 1K resolution will result in artifacts.
|
232 |
Additionally, we recommend using the full generation pipeline for better quality (i.e. enabling prompt enhancement and refinment).
|
|
|
253 |
width=2048,
|
254 |
height=2048,
|
255 |
use_reprompt=True, # Enable prompt enhancement
|
256 |
+
use_refiner=True, # Enable refiner model
|
257 |
# For the distilled model, use 8 steps for faster inference.
|
258 |
+
# For the non-distilled model, use 50 steps for better quality.
|
259 |
num_inference_steps=8 if "distilled" in model_name else 50,
|
260 |
guidance_scale=3.5,
|
261 |
shift=5,
|
|
|
286 |
## Github Star History
|
287 |
<a href="https://star-history.com/#Tencent-Hunyuan/HunyuanImage-2.1&Date">
|
288 |
<picture>
|
289 |
+
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=Tencent-Hunyuan/HunyuanImage-2.1&type=Date1&theme=dark" />
|
290 |
+
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=Tencent-Hunyuan/HunyuanImage-2.1&type=Date1" />
|
291 |
+
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=Tencent-Hunyuan/HunyuanImage-2.1&type=Date1" />
|
292 |
</picture>
|
293 |
</a>
|
294 |
|
README_CN.md
CHANGED
@@ -15,6 +15,11 @@
|
|
15 |
<a href=https://x.com/TencentHunyuan target="_blank"><img src=https://img.shields.io/badge/Hunyuan-black.svg?logo=x height=22px></a>
|
16 |
</div>
|
17 |
|
|
|
|
|
|
|
|
|
|
|
18 |
----
|
19 |
|
20 |
|
@@ -171,11 +176,14 @@ SSAE(结构化语义对齐评估)是一种基于先进多模态大语言模
|
|
171 |
|
172 |
**硬件和操作系统要求:**
|
173 |
- 支持 CUDA 的 NVIDIA GPU。
|
174 |
-
- **最低要求:**
|
|
|
|
|
|
|
|
|
175 |
- 支持的操作系统:Linux。
|
176 |
|
177 |
|
178 |
-
> **注意:** 上述内存要求是在启用模型 CPU offloading 的情况下测量的。如果您的 GPU 有足够的显存,可以禁用 CPU offloading 以提高推理速度。
|
179 |
|
180 |
## 🛠️ 依赖与安装
|
181 |
|
@@ -193,14 +201,14 @@ pip install flash-attn==2.7.3 --no-build-isolation
|
|
193 |
|
194 |
## 🧱 模型下载
|
195 |
|
196 |
-
模型的下载与说明请参考[这里](
|
197 |
|
198 |
## 🔑 使用
|
199 |
-
|
200 |
HunyuanImage-2.1 仅支持 2K 分辨率图像生成(如 1:1 时为 2048x2048,16:9 时为 2560x1536 等)。
|
201 |
使用其1K分辨率生成图像可能会带来画质下降与瑕疵。
|
202 |
此外,我们建议使用完整的生成流程以获得更高画质(即启用提示词增强和精修功能)。
|
203 |
|
|
|
204 |
```python
|
205 |
import torch
|
206 |
from hyimage.diffusion.pipelines.hunyuanimage_pipeline import HunyuanImagePipeline
|
@@ -223,8 +231,8 @@ image = pipe(
|
|
223 |
width=2048,
|
224 |
height=2048,
|
225 |
use_reprompt=True, # 启用提示词增强
|
226 |
-
use_refiner=True,
|
227 |
-
# 对于蒸馏版模型,建议使用 8
|
228 |
# 对于非蒸馏版模型,建议使用 50 步以获得更高画质
|
229 |
num_inference_steps=8 if "distilled" in model_name else 50,
|
230 |
guidance_scale=3.5,
|
|
|
15 |
<a href=https://x.com/TencentHunyuan target="_blank"><img src=https://img.shields.io/badge/Hunyuan-black.svg?logo=x height=22px></a>
|
16 |
</div>
|
17 |
|
18 |
+
|
19 |
+
<p align="center">
|
20 |
+
👋 加入我们的 <a href="assets/WECHAT.md" target="_blank">WeChat</a>
|
21 |
+
</p>
|
22 |
+
|
23 |
----
|
24 |
|
25 |
|
|
|
176 |
|
177 |
**硬件和操作系统要求:**
|
178 |
- 支持 CUDA 的 NVIDIA GPU。
|
179 |
+
- **最低要求:** 36 GB 显存,可用于 2048x2048 图像生成。
|
180 |
+
|
181 |
+
> ✨ 即将推出 FP8 量化模型,推理所需显存将进一步降低,敬请期待 👀!
|
182 |
+
|
183 |
+
> **注意:** 上述内存要求是在启用模型 CPU offloading 的情况下测量的。如果您的 GPU 有足够的显存,可以禁用 CPU offloading 以提高推理速度。
|
184 |
- 支持的操作系统:Linux。
|
185 |
|
186 |
|
|
|
187 |
|
188 |
## 🛠️ 依赖与安装
|
189 |
|
|
|
201 |
|
202 |
## 🧱 模型下载
|
203 |
|
204 |
+
模型的下载与说明请参考[这里](checkpoints-download.md)。
|
205 |
|
206 |
## 🔑 使用
|
|
|
207 |
HunyuanImage-2.1 仅支持 2K 分辨率图像生成(如 1:1 时为 2048x2048,16:9 时为 2560x1536 等)。
|
208 |
使用其1K分辨率生成图像可能会带来画质下降与瑕疵。
|
209 |
此外,我们建议使用完整的生成流程以获得更高画质(即启用提示词增强和精修功能)。
|
210 |
|
211 |
+
|
212 |
```python
|
213 |
import torch
|
214 |
from hyimage.diffusion.pipelines.hunyuanimage_pipeline import HunyuanImagePipeline
|
|
|
231 |
width=2048,
|
232 |
height=2048,
|
233 |
use_reprompt=True, # 启用提示词增强
|
234 |
+
use_refiner=True, # 启用精修模型, 以获得更高画质
|
235 |
+
# 对于蒸馏版模型,建议使用 8 步以加快推理速度
|
236 |
# 对于非蒸馏版模型,建议使用 50 步以获得更高画质
|
237 |
num_inference_steps=8 if "distilled" in model_name else 50,
|
238 |
guidance_scale=3.5,
|