Skip to content
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
8b7ea81
add
yiyixuxu Nov 20, 2025
56d57c3
add first pipeline draft
yiyixuxu Nov 22, 2025
b282ac1
add text encoders to conversion script
yiyixuxu Nov 22, 2025
5732d60
fix a bit more, remove print lines
yiyixuxu Nov 22, 2025
76bb607
fix more, system prompt etc
yiyixuxu Nov 23, 2025
c739ee9
update conversion script
Nov 26, 2025
2f6914d
up up
Nov 26, 2025
a0b2fe0
update conversion script: remove dtype, always keep same precision as…
Nov 27, 2025
db0127c
fix
Nov 27, 2025
38c42b4
conversion scripts
Nov 27, 2025
090ceb5
remove dtype from the _get_ encodeing methods
Nov 29, 2025
e3301cb
add i2v pipeline
Nov 29, 2025
753d407
add image to video pipeline
Nov 29, 2025
0687a40
remove use_meanflow
Nov 29, 2025
c22915d
up up
Nov 29, 2025
f9cb82b
a few small fix: proprocess, cpu_offloading, attention backend
Nov 30, 2025
e319d72
simplify transformer
Nov 30, 2025
e194034
clean up a bit more pipelines
Nov 30, 2025
3980f97
Merge branch 'main' into hunyuanvideo15
yiyixuxu Nov 30, 2025
5029dbf
style
Nov 30, 2025
8aa458e
copies
Nov 30, 2025
50abf50
add docs
Nov 30, 2025
7aeab3f
add to toctree
Nov 30, 2025
c3f4598
up
Nov 30, 2025
54f008e
Update docs/source/en/api/pipelines/hunyuan_video15.md
yiyixuxu Nov 30, 2025
237d318
Apply suggestions from code review
yiyixuxu Nov 30, 2025
d7f399d
add a notes on the doc about attention backend
Dec 1, 2025
bdfab30
up
Dec 1, 2025
2c018f8
Update docs/source/en/api/pipelines/hunyuan_video15.md
yiyixuxu Dec 1, 2025
c715470
add a note on changing guidance_scale on doc
yiyixuxu Dec 1, 2025
0dae8f9
Apply suggestions from code review
yiyixuxu Dec 1, 2025
5989014
Update docs/source/en/api/pipelines/hunyuan_video15.md
yiyixuxu Dec 1, 2025
404d3fa
Update docs/source/en/api/pipelines/hunyuan_video15.md
yiyixuxu Dec 1, 2025
0869b22
tests for Hunyuan 1.5 (#12759)
sayakpaul Dec 1, 2025
6bfb75a
Apply style fixes
github-actions[bot] Dec 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/source/en/_toctree.yml
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,8 @@
title: HunyuanDiT2DModel
- local: api/models/hunyuanimage_transformer_2d
title: HunyuanImageTransformer2DModel
- local: api/models/hunyuan_video15_transformer_3d
title: HunyuanVideo15Transformer3DModel
- local: api/models/hunyuan_video_transformer_3d
title: HunyuanVideoTransformer3DModel
- local: api/models/latte_transformer3d
Expand Down Expand Up @@ -433,6 +435,8 @@
title: AutoencoderKLHunyuanImageRefiner
- local: api/models/autoencoder_kl_hunyuan_video
title: AutoencoderKLHunyuanVideo
- local: api/models/autoencoder_kl_hunyuan_video15
title: AutoencoderKLHunyuanVideo15
- local: api/models/autoencoderkl_ltx_video
title: AutoencoderKLLTXVideo
- local: api/models/autoencoderkl_magvit
Expand Down Expand Up @@ -652,6 +656,8 @@
title: Framepack
- local: api/pipelines/hunyuan_video
title: HunyuanVideo
- local: api/pipelines/hunyuan_video15
title: HunyuanVideo1.5
- local: api/pipelines/i2vgenxl
title: I2VGen-XL
- local: api/pipelines/kandinsky5_video
Expand Down
36 changes: 36 additions & 0 deletions docs/source/en/api/models/autoencoder_kl_hunyuan_video15.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!-- Copyright 2025 The HuggingFace Team. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License. -->

# AutoencoderKLHunyuanVideo15

The 3D variational autoencoder (VAE) model with KL loss used in [HunyuanVideo1.5](https://github.com/Tencent/HunyuanVideo1-1.5) by Tencent.

The model can be loaded with the following code snippet.

```python
from diffusers import AutoencoderKLHunyuanVideo15

vae = AutoencoderKLHunyuanVideo15.from_pretrained("hunyuanvideo-community/HunyuanVideo-1.5-Diffusers-480p_t2v", subfolder="vae", torch_dtype=torch.float32)

# make sure to enable tiling to avoid OOM
vae.enable_tiling()
```

## AutoencoderKLHunyuanVideo15

[[autodoc]] AutoencoderKLHunyuanVideo15
- decode
- encode
- all

## DecoderOutput

[[autodoc]] models.autoencoders.vae.DecoderOutput
30 changes: 30 additions & 0 deletions docs/source/en/api/models/hunyuan_video15_transformer_3d.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!-- Copyright 2025 The HuggingFace Team. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License. -->

# HunyuanVideo15Transformer3DModel

A Diffusion Transformer model for 3D video-like data used in [HunyuanVideo1.5](https://github.com/Tencent/HunyuanVideo1-1.5).

The model can be loaded with the following code snippet.

```python
from diffusers import HunyuanVideo15Transformer3DModel

transformer = HunyuanVideo15Transformer3DModel.from_pretrained("hunyuanvideo-community/HunyuanVideo-1.5-Diffusers-480p_t2v" subfolder="transformer", torch_dtype=torch.bfloat16)
```

## HunyuanVideo15Transformer3DModel

[[autodoc]] HunyuanVideo15Transformer3DModel

## Transformer2DModelOutput

[[autodoc]] models.modeling_outputs.Transformer2DModelOutput
70 changes: 70 additions & 0 deletions docs/source/en/api/pipelines/hunyuan_video15.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<!-- Copyright 2025 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License. -->


# HunyuanVideo-1.5

HunyuanVideo-1.5 is a lightweight yet powerful video generation model that achieves state-of-the-art visual quality and motion coherence with only 8.3 billion parameters, enabling efficient inference on consumer-grade GPUs. This achievement is built upon several key components, including meticulous data curation, an advanced DiT architecture with selective and sliding tile attention (SSTA), enhanced bilingual understanding through glyph-aware text encoding, progressive pre-training and post-training, and an efficient video super-resolution network. Leveraging these designs, we developed a unified framework capable of high-quality text-to-video and image-to-video generation across multiple durations and resolutions. Extensive experiments demonstrate that this compact and proficient model establishes a new state-of-the-art among open-source models.

You can find all the original HunyuanVideo checkpoints under the [Tencent](https://huggingface.co/tencent) organization.

> [!TIP]
> Click on the HunyuanVideo models in the right sidebar for more examples of video generation tasks.
>
> The examples below use a checkpoint from [hunyuanvideo-community](https://huggingface.co/hunyuanvideo-community) because the weights are stored in a layout compatible with Diffusers.

The example below demonstrates how to generate a video optimized for memory or inference speed.

<hfoptions id="usage">
<hfoption id="memory">

Refer to the [Reduce memory usage](../../optimization/memory) guide for more details about the various memory saving techniques.


```py
import torch
from diffusers import AutoModel, HunyuanVideo15Pipeline
from diffusers.utils import export_to_video


pipeline = HunyuanVideo15Pipeline.from_pretrained(
"HunyuanVideo-1.5-Diffusers-480p_t2v",
torch_dtype=torch.bfloat16,
)

# model-offloading and tiling
pipeline.enable_model_cpu_offload()
pipeline.vae.enable_tiling()

prompt = "A fluffy teddy bear sits on a bed of soft pillows surrounded by children's toys."
video = pipeline(prompt=prompt, num_frames=61, num_inference_steps=30).frames[0]
export_to_video(video, "output.mp4", fps=15)
```


## HunyuanVideo15Pipeline

[[autodoc]] HunyuanVideo15Pipeline
- all
- __call__

## HunyuanVideo15ImageToVideoPipeline

[[autodoc]] HunyuanVideo15ImageToVideoPipeline
- all
- __call__

## HunyuanVideo15PipelineOutput

[[autodoc]] pipelines.hunyuan_video1_5.pipeline_output.HunyuanVideo15PipelineOutput
Loading
Loading