Update README.md
Browse files
README.md
CHANGED
@@ -9,13 +9,13 @@ from diffusers import HunyuanDiT2DControlNetModel, HunyuanDiTControlNetPipeline
|
|
9 |
import torch
|
10 |
|
11 |
|
12 |
-
controlnet = HunyuanDiT2DControlNetModel.from_pretrained("Tencent-Hunyuan/HunyuanDiT-v1.2-ControlNet-Diffusers-
|
13 |
|
14 |
pipe = HunyuanDiTControlNetPipeline.from_pretrained("Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled", controlnet=controlnet, torch_dtype=torch.float16)
|
15 |
pipe.to("cuda")
|
16 |
|
17 |
from diffusers.utils import load_image
|
18 |
-
cond_image = load_image('https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-ControlNet-Diffusers-
|
19 |
|
20 |
## You may also use English prompt as HunyuanDiT supports both English and Chinese
|
21 |
prompt="在夜晚的酒店门前,一座古老的中国风格的狮子雕像矗立着,它的眼睛闪烁着光芒,仿佛在守护着这座建筑。背景是夜晚的酒店前,构图方式是特写,平视,居中构图。这张照片呈现了真实摄影风格,蕴含了中国雕塑文化,同时展现了神秘氛围"
|
@@ -31,4 +31,6 @@ image = pipe(
|
|
31 |
control_image=cond_image,
|
32 |
num_inference_steps=50,
|
33 |
).images[0]
|
|
|
|
|
34 |
```
|
|
|
9 |
import torch
|
10 |
|
11 |
|
12 |
+
controlnet = HunyuanDiT2DControlNetModel.from_pretrained("Tencent-Hunyuan/HunyuanDiT-v1.2-ControlNet-Diffusers-Canny", torch_dtype=torch.float16)
|
13 |
|
14 |
pipe = HunyuanDiTControlNetPipeline.from_pretrained("Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled", controlnet=controlnet, torch_dtype=torch.float16)
|
15 |
pipe.to("cuda")
|
16 |
|
17 |
from diffusers.utils import load_image
|
18 |
+
cond_image = load_image('https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-ControlNet-Diffusers-Canny/resolve/main/canny.jpg?download=true')
|
19 |
|
20 |
## You may also use English prompt as HunyuanDiT supports both English and Chinese
|
21 |
prompt="在夜晚的酒店门前,一座古老的中国风格的狮子雕像矗立着,它的眼睛闪烁着光芒,仿佛在守护着这座建筑。背景是夜晚的酒店前,构图方式是特写,平视,居中构图。这张照片呈现了真实摄影风格,蕴含了中国雕塑文化,同时展现了神秘氛围"
|
|
|
31 |
control_image=cond_image,
|
32 |
num_inference_steps=50,
|
33 |
).images[0]
|
34 |
+
|
35 |
+
image.save('./image.png')
|
36 |
```
|