update README
Browse files- README.md +11 -0
- README_CN.md +11 -0
README.md
CHANGED
@@ -223,6 +223,10 @@ The details of download pretrained models are shown [here](checkpoints-download.
|
|
223 |
|
224 |
## 🔑 Usage
|
225 |
|
|
|
|
|
|
|
|
|
226 |
```python
|
227 |
import torch
|
228 |
from hyimage.diffusion.pipelines.hunyuanimage_pipeline import HunyuanImagePipeline
|
@@ -235,6 +239,13 @@ pipe = pipe.to("cuda")
|
|
235 |
prompt = "A cute, cartoon-style anthropomorphic penguin plush toy with fluffy fur, standing in a painting studio, wearing a red knitted scarf and a red beret with the word “Tencent” on it, holding a paintbrush with a focused expression as it paints an oil painting of the Mona Lisa, rendered in a photorealistic photographic style."
|
236 |
image = pipe(
|
237 |
prompt=prompt,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
238 |
width=2048,
|
239 |
height=2048,
|
240 |
use_reprompt=True, # Enable prompt enhancement
|
|
|
223 |
|
224 |
## 🔑 Usage
|
225 |
|
226 |
+
HunyuanImage-2.1 only supports 2K image generation (e.g. 2048x2048 for 1:1 images, 2560x1536 for 16:9 images, etc.).
|
227 |
+
Generating images with 1K resolution will result in artifacts.
|
228 |
+
Additionally, we recommend using the full generation pipeline for better quality (i.e. enabling prompt enhancement and refinment).
|
229 |
+
|
230 |
```python
|
231 |
import torch
|
232 |
from hyimage.diffusion.pipelines.hunyuanimage_pipeline import HunyuanImagePipeline
|
|
|
239 |
prompt = "A cute, cartoon-style anthropomorphic penguin plush toy with fluffy fur, standing in a painting studio, wearing a red knitted scarf and a red beret with the word “Tencent” on it, holding a paintbrush with a focused expression as it paints an oil painting of the Mona Lisa, rendered in a photorealistic photographic style."
|
240 |
image = pipe(
|
241 |
prompt=prompt,
|
242 |
+
# Examples of supported resolutions and aspect ratios for HunyuanImage-2.1:
|
243 |
+
# 16:9 -> width=2560, height=1536
|
244 |
+
# 4:3 -> width=2304, height=1792
|
245 |
+
# 1:1 -> width=2048, height=2048
|
246 |
+
# 3:4 -> width=1792, height=2304
|
247 |
+
# 9:16 -> width=1536, height=2560
|
248 |
+
# Please use one of the above width/height pairs for best results.
|
249 |
width=2048,
|
250 |
height=2048,
|
251 |
use_reprompt=True, # Enable prompt enhancement
|
README_CN.md
CHANGED
@@ -196,6 +196,10 @@ pip install flash-attn==2.7.3 --no-build-isolation
|
|
196 |
|
197 |
## 🔑 使用
|
198 |
|
|
|
|
|
|
|
|
|
199 |
```python
|
200 |
import torch
|
201 |
from hyimage.diffusion.pipelines.hunyuanimage_pipeline import HunyuanImagePipeline
|
@@ -208,6 +212,13 @@ pipe = pipe.to("cuda")
|
|
208 |
prompt = "A cute, cartoon-style anthropomorphic penguin plush toy with fluffy fur, standing in a painting studio, wearing a red knitted scarf and a red beret with the word “Tencent” on it, holding a paintbrush with a focused expression as it paints an oil painting of the Mona Lisa, rendered in a photorealistic photographic style."
|
209 |
image = pipe(
|
210 |
prompt=prompt,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
width=2048,
|
212 |
height=2048,
|
213 |
use_reprompt=True, # 启用提示词增强
|
|
|
196 |
|
197 |
## 🔑 使用
|
198 |
|
199 |
+
HunyuanImage-2.1 仅支持 2K 分辨率图像生成(如 1:1 时为 2048x2048,16:9 时为 2560x1536 等)。
|
200 |
+
使用其1K分辨率生成图像可能会带来画质下降与瑕疵。
|
201 |
+
此外,我们建议使用完整的生成流程以获得更高画质(即启用提示词增强和精修功能)。
|
202 |
+
|
203 |
```python
|
204 |
import torch
|
205 |
from hyimage.diffusion.pipelines.hunyuanimage_pipeline import HunyuanImagePipeline
|
|
|
212 |
prompt = "A cute, cartoon-style anthropomorphic penguin plush toy with fluffy fur, standing in a painting studio, wearing a red knitted scarf and a red beret with the word “Tencent” on it, holding a paintbrush with a focused expression as it paints an oil painting of the Mona Lisa, rendered in a photorealistic photographic style."
|
213 |
image = pipe(
|
214 |
prompt=prompt,
|
215 |
+
# HunyuanImage-2.1 支持的分辨率与宽高比示例:
|
216 |
+
# 16:9 -> width=2560, height=1536
|
217 |
+
# 4:3 -> width=2304, height=1792
|
218 |
+
# 1:1 -> width=2048, height=2048
|
219 |
+
# 3:4 -> width=1792, height=2304
|
220 |
+
# 9:16 -> width=1536, height=2560
|
221 |
+
# 建议使用上述长宽组合以获得最佳效果。
|
222 |
width=2048,
|
223 |
height=2048,
|
224 |
use_reprompt=True, # 启用提示词增强
|