Downloads · 30 days
114
1% of all-time downloads
hunyuanvideo-community/HunyuanVideo-I2V
HunyuanVideo-I2V is a image-to-video model from hunyuanvideo-community. Use it for the image-to-video task on the model card, and read the license before you ship it in a product. It is set up for diffusers.
Unofficial community fork for Diffusers-format weights on tencent/HunyuanVideo-I2V.
Downloads · 30 days
114
1% of all-time downloads
All-time downloads
10.7K
Public
Parameters
12.8B
43.6 GB on disk
Likes
7
Public
Click a slice to open those files.
.safetensors43.6 GB · 100%
From the Hugging Face model README
Unofficial community fork for Diffusers-format weights on tencent/HunyuanVideo-I2V.
HunyuanVideo-I2V can be used directly from Diffusers. Install the latest version of Diffusers.
import torch
from diffusers import HunyuanVideoImageToVideoPipeline, HunyuanVideoTransformer3DModel
from diffusers.utils import load_image, export_to_video
# Available checkpoints: "hunyuanvideo-community/HunyuanVideo-I2V" and "hunyuanvideo-community/HunyuanVideo-I2V-33ch"
model_id = "hunyuanvideo-community/HunyuanVideo-I2V"
transformer = HunyuanVideoTransformer3DModel.from_pretrained(
model_id, subfolder="transformer", torch_dtype=torch.bfloat16
)
pipe = HunyuanVideoImageToVideoPipeline.from_pretrained(
model_id, transformer=transformer, torch_dtype=torch.float16
)
pipe.vae.enable_tiling()
pipe.to("cuda")
prompt = "A man with short gray hair plays a red electric guitar."
image = load_image(
"https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/guitar-man.png"
)
output = pipe(image=image, prompt=prompt).frames[0]
export_to_video(output, "output.mp4", fps=15)
Refer to the documentation for more information.