Instructions to use Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled 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-Diffusers-Distilled", 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
- Local Apps
- Draw Things
- DiffusionBee
运行报错
pipe = HunyuanDiTPipeline.from_pretrained("/ai/dit_dis", torch_dtype=torch.float16)
pipe.to("cuda:1")
alueError: Cannot load <class 'diffusers.models.transformers.hunyuan_transformer_2d.HunyuanDiT2DModel'> from /ai/dit_dis/transformer because the following keys are missing:
time_extra_emb.style_embedder.weight.
Please make sure to pass low_cpu_mem_usage=False and device_map=None if you want to randomly initialize those weights or else make sure your checkpoint file is correct.
ValueError: Cannot load <class 'diffusers.models.transformers.hunyuan_transformer_2d.HunyuanDiT2DModel'> from /ai/dit_dis/transformer because the following keys are missing:
time_extra_emb.style_embedder.weight.
Please make sure to pass low_cpu_mem_usage=False and device_map=None if you want to randomly initialize those weights or else make sure your checkpoint file is correct.
Windows ComfyUI,how to use?