Text-to-Video
Diffusers
Safetensors
hunyuanvideo
diffusionart
vanzl commited on
Commit
c2ce1ca
·
verified ·
1 Parent(s): b9f83d8

Simplify model card: links, inference and selected videos

Browse files
Files changed (1) hide show
  1. README.md +74 -131
README.md CHANGED
@@ -3,167 +3,110 @@ license: other
3
  license_name: tencent-hunyuan-community
4
  license_link: https://huggingface.co/tencent/HunyuanVideo/blob/6204ad6aea1a77ff5aba337c88278bb9500eb37/LICENSE
5
  base_model: hunyuanvideo-community/HunyuanVideo
 
6
  tags:
7
- - text-to-video
8
  - hunyuanvideo
9
  - diffusionart
 
10
  ---
11
 
12
- # DiffusionART HunyuanVideo 7:2:1 — selected step 30
13
 
 
 
14
  [Project Page](https://vanzll.github.io/diffusionart-project/) ·
15
- [Code](https://github.com/vanzll/DiffusionART)
16
 
17
- This private release is a **full HunyuanVideo transformer**, not a complete
18
- pipeline or LoRA adapter. It is the selected optimizer-step-30 checkpoint from
19
- [run `tk1w4go1`](https://wandb.ai/vanzl3386-chinese-university-of-hong-kong-shenzhen/flow-grpo-algo/runs/tk1w4go1).
20
- The original HunyuanVideo-13B transformer was trained with temporal alignment,
21
- video quality, and motion quality rewards weighted 0.7 / 0.2 / 0.1, plus a
22
- frozen pretrained-velocity MSE regularizer with beta 0.1. The transformer is
23
- stored as F32 safetensors shards. The public base model supplies the VAE, text
24
- encoders, tokenizers, and scheduler. `release.json` records the source and shard
25
- hashes; this inference update does not alter those files.
26
 
27
- ## Selected Videos
 
 
28
 
29
- Selected generations from the released model, alongside archived pretrained
30
- references for the same prompts. The two inference paths are not an
31
- identical-noise controlled comparison.
32
- More results: [Project Page](https://vanzll.github.io/diffusionart-project/).
33
 
34
- **Ocean waves roll onto a black sand beach beneath towering green cliffs.**
 
35
 
36
- <table><tr><th>Pretrained</th><th>DiffusionART</th></tr><tr>
37
- <td><video controls muted loop playsinline width="280" src="https://huggingface.co/vanzl/DiffusionART-HunyuanVideo-7-2-1/resolve/main/examples/00100-pretrained.mp4"></video></td>
38
- <td><video controls muted loop playsinline width="280" src="https://huggingface.co/vanzl/DiffusionART-HunyuanVideo-7-2-1/resolve/main/examples/00100-diffusionart.mp4"></video></td>
39
- </tr></table>
40
 
41
- **The camera follows a winding river through a valley of autumn trees.**
42
-
43
- <table><tr><th>Pretrained</th><th>DiffusionART</th></tr><tr>
44
- <td><video controls muted loop playsinline width="280" src="https://huggingface.co/vanzl/DiffusionART-HunyuanVideo-7-2-1/resolve/main/examples/00106-pretrained.mp4"></video></td>
45
- <td><video controls muted loop playsinline width="280" src="https://huggingface.co/vanzl/DiffusionART-HunyuanVideo-7-2-1/resolve/main/examples/00106-diffusionart.mp4"></video></td>
46
- </tr></table>
47
-
48
- **A white horse gallops through shallow water along a sunlit beach.**
49
-
50
- <table><tr><th>Pretrained</th><th>DiffusionART</th></tr><tr>
51
- <td><video controls muted loop playsinline width="280" src="https://huggingface.co/vanzl/DiffusionART-HunyuanVideo-7-2-1/resolve/main/examples/00113-pretrained.mp4"></video></td>
52
- <td><video controls muted loop playsinline width="280" src="https://huggingface.co/vanzl/DiffusionART-HunyuanVideo-7-2-1/resolve/main/examples/00113-diffusionart.mp4"></video></td>
53
- </tr></table>
54
-
55
- **A chef pours hot tea into a glass cup as steam rises.**
56
-
57
- <table><tr><th>Pretrained</th><th>DiffusionART</th></tr><tr>
58
- <td><video controls muted loop playsinline width="280" src="https://huggingface.co/vanzl/DiffusionART-HunyuanVideo-7-2-1/resolve/main/examples/00129-pretrained.mp4"></video></td>
59
- <td><video controls muted loop playsinline width="280" src="https://huggingface.co/vanzl/DiffusionART-HunyuanVideo-7-2-1/resolve/main/examples/00129-diffusionart.mp4"></video></td>
60
- </tr></table>
61
-
62
- **The camera approaches a glass pavilion surrounded by autumn trees.**
63
-
64
- <table><tr><th>Pretrained</th><th>DiffusionART</th></tr><tr>
65
- <td><video controls muted loop playsinline width="280" src="https://huggingface.co/vanzl/DiffusionART-HunyuanVideo-7-2-1/resolve/main/examples/00139-pretrained.mp4"></video></td>
66
- <td><video controls muted loop playsinline width="280" src="https://huggingface.co/vanzl/DiffusionART-HunyuanVideo-7-2-1/resolve/main/examples/00139-diffusionart.mp4"></video></td>
67
- </tr></table>
68
-
69
- **Sunlight sparkles through a rotating crystal prism on a white surface.**
70
-
71
- <table><tr><th>Pretrained</th><th>DiffusionART</th></tr><tr>
72
- <td><video controls muted loop playsinline width="280" src="https://huggingface.co/vanzl/DiffusionART-HunyuanVideo-7-2-1/resolve/main/examples/00148-pretrained.mp4"></video></td>
73
- <td><video controls muted loop playsinline width="280" src="https://huggingface.co/vanzl/DiffusionART-HunyuanVideo-7-2-1/resolve/main/examples/00148-diffusionart.mp4"></video></td>
74
- </tr></table>
75
-
76
- ## Requirements
77
-
78
- - Access to this private Hugging Face repository through `HF_TOKEN` or an
79
- interactive Hugging Face login. The commands keep the login and model cache
80
- in the chosen work directory. Do not put a token in a script or shell history.
81
- - Linux x86-64, Python **3.12**, a CUDA 12.1 compatible NVIDIA driver and CUDA
82
- toolkit (`nvcc`) for building the pinned `flash-attn` version, plus `curl`,
83
- `tar`, and `sha256sum`.
84
- - One H800 with **at least 100 GiB available GPU memory** for the verified
85
- default path. Independent inference used one 140 GiB H800 and peaked at
86
- 92.39 GiB allocated. Allow at least **100 GiB writable disk space** for the
87
- private transformer, pinned public base assets, and installation caches.
88
- `--cpu-offload` is available for constrained GPUs but was not part of the
89
- independent acceptance run.
90
-
91
- ## Install and generate one MP4
92
-
93
- The commands use only this release and the fixed **public**
94
- [`XueZeyue/DanceGRPO`](https://github.com/XueZeyue/DanceGRPO/tree/15cc71d53cc2e6e18a68ee607d5fb6ba9a99e344)
95
- runtime. No private training repository, saved prompt embeddings, notebook, or
96
- MPI launcher is needed. Choose a work directory with the required free space.
97
 
98
  ```bash
99
  export RUN_DIR="${RUN_DIR:-$PWD/diffusionart-t2v-demo}"
100
  export HF_HOME="$RUN_DIR/cache/hf"
101
- export HF_HUB_CACHE="$HF_HOME/hub"
102
  export PIP_CACHE_DIR="$RUN_DIR/pip-cache"
103
  export TMPDIR="$RUN_DIR/tmp"
104
  export XDG_CACHE_HOME="$RUN_DIR/xdg-cache"
105
- mkdir -p "$RUN_DIR" "$HF_HOME" "$HF_HUB_CACHE" "$PIP_CACHE_DIR" "$TMPDIR" "$XDG_CACHE_HOME"
106
  cd "$RUN_DIR"
107
  python3.12 -m venv bootstrap
108
  bootstrap/bin/python -m pip install 'huggingface-hub==0.26.1'
109
- if [ -z "${HF_TOKEN:-}" ] && [ ! -f "$HF_HOME/token" ]; then
110
- bootstrap/bin/huggingface-cli login
111
- fi
112
-
113
- # If MODEL_REVISION is already set to a known 40-character commit SHA, keep it.
114
- # Otherwise resolve main exactly once, then pin every download to that SHA.
115
- if [ -z "${MODEL_REVISION:-}" ]; then
116
- MODEL_REVISION="$(bootstrap/bin/python -c 'from huggingface_hub import HfApi; print(HfApi().model_info("vanzl/DiffusionART-HunyuanVideo-7-2-1", token=True).sha)')"
117
- fi
118
- export MODEL_REVISION
119
- printf 'Pinned model revision: %s\n' "$MODEL_REVISION"
120
 
121
  bootstrap/bin/python - <<'PY'
122
- import os
123
  from huggingface_hub import snapshot_download
124
  snapshot_download(
125
- repo_id="vanzl/DiffusionART-HunyuanVideo-7-2-1",
126
- revision=os.environ["MODEL_REVISION"],
127
- token=True,
128
- allow_patterns=["README.md", "infer.py", "install.sh", "requirements-inference.txt"],
129
  local_dir="release",
130
  )
131
  PY
 
 
 
 
 
132
 
133
- bash release/install.sh "$RUN_DIR/venv" "$RUN_DIR/DanceGRPO-public"
134
- "$RUN_DIR/venv/bin/python" release/infer.py \
135
- --revision "$MODEL_REVISION" \
136
- --prompt 'A white horse gallops through shallow water along a sunlit beach.' \
137
- --seed 42 \
138
- --output "$RUN_DIR/horse_seed42.mp4" \
139
- --cache-dir "$RUN_DIR/cache"
 
 
 
 
 
 
 
 
 
 
 
 
140
  ```
141
 
142
- `install.sh` installs PyTorch **2.5.0+cu121**, torchvision **0.20.0+cu121**,
143
- the versions in `requirements-inference.txt`, `flash-attn==2.7.0.post2`,
144
- `liger-kernel==0.4.1`, and the public DanceGRPO commit
145
- `15cc71d53cc2e6e18a68ee607d5fb6ba9a99e344`. It verifies the public
146
- source archive SHA256 before installation. `infer.py` downloads this model at
147
- `--revision` and the base model at fixed revision
148
- `e8c2aaa66fe3742a32c11a6766aecbf07c56e773` into `--cache-dir`.
149
- Pass a different `--prompt`, `--seed`, or `--output` to make another video.
150
- `infer.py` refuses to overwrite an existing MP4 and validates the generated
151
- file by decoding every frame.
152
-
153
- The verified protocol is **640×640, 53 frames, 8 FPS, 30 sampling steps,
154
- FlowMatchEulerDiscreteScheduler shift 7, eta 0, and no classic CFG**. The
155
- public pipeline takes `guidance_scale=6.018` as the user-facing value and
156
- multiplies it by 1000 internally, yielding embedded guidance **6018**. Do not
157
- pass 6018 as `guidance_scale`. The loader keeps the transformer in F32, runs
158
- with BF16 autocast, loads both tokenizers from the pinned public base model,
159
- and enables VAE tiling. The script prints the MP4 SHA256, decoded frame count,
160
- resolution, FPS, and pixel statistics after a successful run.
161
-
162
- ## Terms and provenance
163
-
164
- The package has no optimizer, RNG state, or training code. Tencent's original
165
- HunyuanVideo weights and derivatives are subject to the **Tencent Hunyuan
166
- Community License Agreement**. Read the included [LICENSE.txt](LICENSE.txt)
167
- and [Notice](Notice) before use. The model card and inference helpers do not
168
- change their terms. The original run was planned for 100 updates but stopped
169
- at step 40; this release selects step 30 and does not claim 100 updates.
 
3
  license_name: tencent-hunyuan-community
4
  license_link: https://huggingface.co/tencent/HunyuanVideo/blob/6204ad6aea1a77ff5aba337c88278bb9500eb37/LICENSE
5
  base_model: hunyuanvideo-community/HunyuanVideo
6
+ pipeline_tag: text-to-video
7
  tags:
 
8
  - hunyuanvideo
9
  - diffusionart
10
+ - arxiv:2610.12572
11
  ---
12
 
13
+ # DiffusionART · HunyuanVideo
14
 
15
+ [Paper](https://arxiv.org/abs/2610.12572) ·
16
+ [Code](https://github.com/vanzll/DiffusionART) ·
17
  [Project Page](https://vanzll.github.io/diffusionart-project/) ·
18
+ [Demo](https://vanzll.github.io/diffusionart-project/demo.html)
19
 
20
+ HunyuanVideo-13B fine-tuned with **DiffusionART**, using temporal alignment,
21
+ visual quality and motion quality rewards at **7:2:1**, with a pretrained-reference
22
+ MSE regularizer (β = 0.1).
 
 
 
 
 
 
23
 
24
+ This repository contains the **full transformer weights**, not a LoRA or a
25
+ complete pipeline. The inference entry below downloads the base model's VAE
26
+ and text encoders automatically.
27
 
28
+ ## Inference
 
 
 
29
 
30
+ Use the included [infer.py](https://huggingface.co/vanzl/DiffusionART-HunyuanVideo-7-2-1/blob/main/infer.py).
31
+ Expand the setup once, then run the example from the same directory.
32
 
33
+ <details>
34
+ <summary>Environment setup</summary>
 
 
35
 
36
+ Linux, Python 3.12, a CUDA 12.1-compatible driver and toolkit (`nvcc`), and
37
+ approximately 100 GiB of available GPU memory and disk space for the verified
38
+ default path. The installer uses a pinned public DanceGRPO inference runtime.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
 
40
  ```bash
41
  export RUN_DIR="${RUN_DIR:-$PWD/diffusionart-t2v-demo}"
42
  export HF_HOME="$RUN_DIR/cache/hf"
 
43
  export PIP_CACHE_DIR="$RUN_DIR/pip-cache"
44
  export TMPDIR="$RUN_DIR/tmp"
45
  export XDG_CACHE_HOME="$RUN_DIR/xdg-cache"
46
+ mkdir -p "$RUN_DIR" "$HF_HOME" "$PIP_CACHE_DIR" "$TMPDIR" "$XDG_CACHE_HOME"
47
  cd "$RUN_DIR"
48
  python3.12 -m venv bootstrap
49
  bootstrap/bin/python -m pip install 'huggingface-hub==0.26.1'
50
+ bootstrap/bin/huggingface-cli login
 
 
 
 
 
 
 
 
 
 
51
 
52
  bootstrap/bin/python - <<'PY'
 
53
  from huggingface_hub import snapshot_download
54
  snapshot_download(
55
+ "vanzl/DiffusionART-HunyuanVideo-7-2-1",
56
+ revision="b9f83d8fc677be078cf20e75e2149a5f69059220",
57
+ allow_patterns=["infer.py", "install.sh", "requirements-inference.txt"],
 
58
  local_dir="release",
59
  )
60
  PY
61
+ bash release/install.sh "$RUN_DIR/venv" "$RUN_DIR/runtime"
62
+ ```
63
+
64
+ The fixed revision preserves the released weights and inference entry.
65
+ Hugging Face login is used by that entry even though this model is public.
66
 
67
+ </details>
68
+
69
+ ```bash
70
+ venv/bin/python - <<'PY'
71
+ import runpy
72
+ import sys
73
+ import torch
74
+
75
+ # Use the attention backend from the successful inference checks.
76
+ torch.backends.cuda.enable_cudnn_sdp(False)
77
+ sys.argv = [
78
+ "infer.py",
79
+ "--revision", "b9f83d8fc677be078cf20e75e2149a5f69059220",
80
+ "--prompt", "A white horse gallops through shallow water along a sunlit beach.",
81
+ "--output", "diffusionart.mp4",
82
+ "--cache-dir", "cache",
83
+ ]
84
+ runpy.run_path("release/infer.py", run_name="__main__")
85
+ PY
86
  ```
87
 
88
+ Defaults: **640×640 · 53 frames · 8 FPS · 30 sampling steps**.
89
+ The script uses the verified shift, guidance, precision and VAE settings.
90
+ Change `--prompt` and `--output` for another video; an existing output is never overwritten.
91
+
92
+ ## Examples
93
+
94
+ Selected outputs from this model. See the [Demo](https://vanzll.github.io/diffusionart-project/demo.html)
95
+ for the full gallery and pretrained comparisons.
96
+
97
+ <table>
98
+ <tr>
99
+ <td><video controls muted loop playsinline preload="none" width="280" poster="https://vanzll.github.io/diffusionart-project/assets/hf-video-00113-after.jpg" src="https://huggingface.co/vanzl/DiffusionART-HunyuanVideo-7-2-1/resolve/main/examples/00113-diffusionart.mp4"></video><p>A white horse gallops through shallow water along a sunlit beach.</p></td>
100
+ <td><video controls muted loop playsinline preload="none" width="280" poster="https://vanzll.github.io/diffusionart-project/assets/hf-video-00139-after.jpg" src="https://huggingface.co/vanzl/DiffusionART-HunyuanVideo-7-2-1/resolve/main/examples/00139-diffusionart.mp4"></video><p>The camera approaches a glass pavilion surrounded by autumn trees.</p></td>
101
+ </tr>
102
+ <tr>
103
+ <td><video controls muted loop playsinline preload="none" width="280" poster="https://vanzll.github.io/diffusionart-project/assets/hf-video-00106-after.jpg" src="https://huggingface.co/vanzl/DiffusionART-HunyuanVideo-7-2-1/resolve/main/examples/00106-diffusionart.mp4"></video><p>The camera follows a winding river through a valley of autumn trees.</p></td>
104
+ <td><video controls muted loop playsinline preload="none" width="280" poster="https://vanzll.github.io/diffusionart-project/assets/hf-video-00148-after.jpg" src="https://huggingface.co/vanzl/DiffusionART-HunyuanVideo-7-2-1/resolve/main/examples/00148-diffusionart.mp4"></video><p>Sunlight sparkles through a rotating crystal prism on a white surface.</p></td>
105
+ </tr>
106
+ </table>
107
+
108
+ ## License
109
+
110
+ Subject to the [Tencent Hunyuan Community License](https://huggingface.co/vanzl/DiffusionART-HunyuanVideo-7-2-1/blob/main/LICENSE.txt)
111
+ and [Notice](https://huggingface.co/vanzl/DiffusionART-HunyuanVideo-7-2-1/blob/main/Notice).
112
+ Training provenance and weight hashes are recorded in [release.json](https://huggingface.co/vanzl/DiffusionART-HunyuanVideo-7-2-1/blob/main/release.json).