Instructions to use Tencent-Hunyuan/HunyuanDiT-v1.2-ControlNet-Diffusers-Canny with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Tencent-Hunyuan/HunyuanDiT-v1.2-ControlNet-Diffusers-Canny with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Tencent-Hunyuan/HunyuanDiT-v1.2-ControlNet-Diffusers-Canny", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Upload config.json with huggingface_hub
Browse files- config.json +23 -0
config.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "HunyuanDiT2DControlNetModel",
|
| 3 |
+
"_diffusers_version": "0.30.0.dev0",
|
| 4 |
+
"activation_fn": "gelu-approximate",
|
| 5 |
+
"attention_head_dim": 88,
|
| 6 |
+
"conditioning_channels": 3,
|
| 7 |
+
"cross_attention_dim": 1024,
|
| 8 |
+
"cross_attention_dim_t5": 2048,
|
| 9 |
+
"hidden_size": 1408,
|
| 10 |
+
"in_channels": 4,
|
| 11 |
+
"learn_sigma": true,
|
| 12 |
+
"mlp_ratio": 4.3637,
|
| 13 |
+
"norm_type": "layer_norm",
|
| 14 |
+
"num_attention_heads": 16,
|
| 15 |
+
"num_layers": 40,
|
| 16 |
+
"patch_size": 2,
|
| 17 |
+
"pooled_projection_dim": 1024,
|
| 18 |
+
"sample_size": 128,
|
| 19 |
+
"text_len": 77,
|
| 20 |
+
"text_len_t5": 256,
|
| 21 |
+
"transformer_num_layers": 40,
|
| 22 |
+
"use_style_cond_and_image_meta_size": false
|
| 23 |
+
}
|