Instructions to use diffusers/HunyuanVideo-vae with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use diffusers/HunyuanVideo-vae with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("diffusers/HunyuanVideo-vae", 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 folder using huggingface_hub
Browse files- handler.py +2 -2
handler.py
CHANGED
|
@@ -8,8 +8,8 @@ from diffusers.utils import export_to_video
|
|
| 8 |
|
| 9 |
class EndpointHandler:
|
| 10 |
def __init__(self, path=""):
|
| 11 |
-
self.device = "
|
| 12 |
-
self.dtype = torch.
|
| 13 |
self.vae = (
|
| 14 |
AutoencoderKLHunyuanVideo.from_pretrained(
|
| 15 |
path, subfolder="vae", torch_dtype=self.dtype
|
|
|
|
| 8 |
|
| 9 |
class EndpointHandler:
|
| 10 |
def __init__(self, path=""):
|
| 11 |
+
self.device = "cuda"
|
| 12 |
+
self.dtype = torch.float16
|
| 13 |
self.vae = (
|
| 14 |
AutoencoderKLHunyuanVideo.from_pretrained(
|
| 15 |
path, subfolder="vae", torch_dtype=self.dtype
|