YiYiXu HF Staff commited on
Commit
7dfab50
·
verified ·
1 Parent(s): a3bb2b8

Create README.md

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