Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
```py
|
| 2 |
+
from diffusers import HunyuanImagePipeline
|
| 3 |
+
import torch
|
| 4 |
+
|
| 5 |
+
device = "cuda:0"
|
| 6 |
+
dtype = torch.bfloat16
|
| 7 |
+
repo = "YiYiXu/HunyuanImage-2.1-Diffusers"
|
| 8 |
+
|
| 9 |
+
pipe = HunyuanImagePipeline.from_pretrained(repo, torch_dtype=dtype)
|
| 10 |
+
pipe = pipe.to(device)
|
| 11 |
+
|
| 12 |
+
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."
|
| 13 |
+
|
| 14 |
+
generator = torch.Generator(device=device).manual_seed(649151)
|
| 15 |
+
out = pipe(
|
| 16 |
+
prompt,
|
| 17 |
+
num_inference_steps=50,
|
| 18 |
+
true_cfg_scale =3.5,
|
| 19 |
+
negative_prompt = "",
|
| 20 |
+
height=2048,
|
| 21 |
+
width=2048,
|
| 22 |
+
generator=generator,
|
| 23 |
+
).images[0]
|
| 24 |
+
|
| 25 |
+
out.save("test_hyimage_output.png")
|
| 26 |
+
```
|