Instructions to use Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers 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 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", 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
images = (images * 255).round().astype("uint8")
#2
by ghy-cmd - opened
How can I solve this problem?
/usr/local/lib/python3.8/dist-packages/diffusers/image_processor.py:111: RuntimeWarning: invalid value encountered in cast
images = (images * 255).round().astype("uint8")
My diffusers and transformer are already updated.
diffusers == 0.31.0.dev0
transformer == 4.44.2
torch == 2.1.0