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
| { | |
| "_class_name": "HunyuanDiT2DControlNetModel", | |
| "_diffusers_version": "0.30.0.dev0", | |
| "activation_fn": "gelu-approximate", | |
| "attention_head_dim": 88, | |
| "conditioning_channels": 3, | |
| "cross_attention_dim": 1024, | |
| "cross_attention_dim_t5": 2048, | |
| "hidden_size": 1408, | |
| "in_channels": 4, | |
| "learn_sigma": true, | |
| "mlp_ratio": 4.3637, | |
| "norm_type": "layer_norm", | |
| "num_attention_heads": 16, | |
| "num_layers": 40, | |
| "patch_size": 2, | |
| "pooled_projection_dim": 1024, | |
| "sample_size": 128, | |
| "text_len": 77, | |
| "text_len_t5": 256, | |
| "transformer_num_layers": 40, | |
| "use_style_cond_and_image_meta_size": false | |
| } | |