Skip to content

Commit b3c7ce7

Browse files
committed
update
1 parent 83c08e4 commit b3c7ce7

File tree

2 files changed

+31
-7
lines changed

2 files changed

+31
-7
lines changed

docs/source/en/api/pipelines/hunyuan_video.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,22 @@ Recommendations for inference:
3232
- For smaller resolution videos, try lower values of `shift` (between `2.0` to `5.0`) in the [Scheduler](https://huggingface.co/docs/diffusers/main/en/api/schedulers/flow_match_euler_discrete#diffusers.FlowMatchEulerDiscreteScheduler.shift). For larger resolution images, try higher values (between `7.0` and `12.0`). The default value is `7.0` for HunyuanVideo.
3333
- For more information about supported resolutions and other details, please refer to the original repository [here](https://github.com/Tencent/HunyuanVideo/).
3434

35+
36+
## Available models
37+
38+
The following models are available for the [`HunyuanVideoPipeline`](text-to-video) pipeline:
39+
40+
| Model name | Description |
41+
|:---|:---|
42+
| [`hunyuanvideo-community/HunyuanVideo`](https://huggingface.co/hunyuanvideo-community/HunyuanVideo) | Official HunyuanVideo (guidance-distilled). Performs best at multiple resolutions and frames. Performs best with `guidance_scale=6.0`, `true_cfg_scale=1.0` and without a negative prompt. |
43+
| [`https://huggingface.co/Skywork/SkyReels-V1-Hunyuan-T2V`](https://huggingface.co/Skywork/SkyReels-V1-Hunyuan-T2V) | Skywork's custom finetune of HunyuanVideo (de-distilled). Performs best with `97x544x960` resolution, `guidance_scale=1.0`, `true_cfg_scale=6.0` and a negative prompt. |
44+
45+
The following models are available for the image-to-video pipeline:
46+
47+
| Model name | Description |
48+
|:---|:---|
49+
| [`https://huggingface.co/Skywork/SkyReels-V1-Hunyuan-I2V`](https://huggingface.co/Skywork/SkyReels-V1-Hunyuan-I2V) | Skywork's custom finetune of HunyuanVideo (de-distilled). Performs best with `97x544x960` resolution. Performs best at `97x544x960` resolution, `guidance_scale=1.0`, `true_cfg_scale=6.0` and a negative prompt. |
50+
3551
## Quantization
3652

3753
Quantization helps reduce the memory requirements of very large models by storing model weights in a lower precision data type. However, quantization may have varying impact on video quality depending on the video model.

src/diffusers/pipelines/hunyuan_video/pipeline_hunyuan_skyreels_image2video.py

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,26 +46,34 @@
4646
```python
4747
>>> import torch
4848
>>> from diffusers import HunyuanSkyreelsImageToVideoPipeline, HunyuanVideoTransformer3DModel
49-
>>> from diffusers.utils import export_to_video
49+
>>> from diffusers.utils import load_image, export_to_video
5050
5151
>>> model_id = "hunyuanvideo-community/HunyuanVideo"
52+
>>> transformer_model_id = "Skywork/SkyReels-V1-Hunyuan-I2V"
5253
>>> transformer = HunyuanVideoTransformer3DModel.from_pretrained(
53-
... model_id, subfolder="transformer", torch_dtype=torch.bfloat16
54+
... transformer_model_id, torch_dtype=torch.bfloat16
5455
... )
5556
>>> pipe = HunyuanSkyreelsImageToVideoPipeline.from_pretrained(
5657
... model_id, transformer=transformer, torch_dtype=torch.float16
5758
... )
5859
>>> pipe.vae.enable_tiling()
5960
>>> pipe.to("cuda")
6061
62+
>>> prompt = "An astronaut hatching from an egg, on the surface of the moon, the darkness and depth of space realised in the background. High quality, ultrarealistic detail and breath-taking movie-like camera shot."
63+
>>> negative_prompt = "Aerial view, aerial view, overexposed, low quality, deformation, a poor composition, bad hands, bad teeth, bad eyes, bad limbs, distortion"
64+
>>> image = load_image(
65+
... "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/astronaut.jpg"
66+
... )
67+
6168
>>> output = pipe(
62-
... prompt="A cat walks on the grass, realistic",
63-
... height=320,
64-
... width=512,
65-
... num_frames=61,
69+
... image=image,
70+
... prompt=prompt,
71+
... negative_prompt=negative_prompt,
6672
... num_inference_steps=30,
73+
... true_cfg_scale=6.0,
74+
... guidance_scale=1.0,
6775
... ).frames[0]
68-
>>> export_to_video(output, "output.mp4", fps=15)
76+
>>> export_to_video(output, "output_i2v.mp4", fps=15)
6977
```
7078
"""
7179

0 commit comments

Comments
 (0)