BBuf commited on
Commit
c80fcde
·
verified ·
1 Parent(s): 622ce1f

Update model card with H100 skill 5s validation

Browse files
Files changed (1) hide show
  1. README.md +43 -26
README.md CHANGED
@@ -3,46 +3,63 @@ license: other
3
  base_model: hunyuanvideo-community/HunyuanVideo
4
  library_name: sglang
5
  pipeline_tag: text-to-video
 
 
 
 
 
 
6
  ---
7
 
8
  # HunyuanVideo ModelOpt FP8 SGLang Transformer
9
 
10
- This repository contains a SGLang-ready ModelOpt FP8 transformer override for `hunyuanvideo-community/HunyuanVideo`.
11
- Load it together with the original base model:
 
 
 
 
12
 
13
  ```bash
14
- sglang generate \
15
- --backend=sglang \
16
- --model-path hunyuanvideo-community/HunyuanVideo \
17
- --transformer-path BBuf/HunyuanVideo-ModelOpt-FP8-SGLang \
18
- --height 544 --width 960 --num-frames 17 \
19
- --num-inference-steps 8 --seed 0 \
20
- --prompt "A cinematic shot of a red sports car driving through rain at night, reflections on wet streets, smooth camera movement." \
21
- --save-output
22
  ```
23
 
24
- ## Validation Snapshot
 
 
 
 
25
 
26
- Validated on one H100 GPU with SGLang main plus the Qwen Image ModelOpt FP8 support commit and the HunyuanVideo FP8 changes.
27
 
28
- - Base model: `hunyuanvideo-community/HunyuanVideo`
29
- - Precision: ModelOpt FP8 transformer override, non-transformer components from the base model
30
- - Resolution: 960x544, 17 frames
31
- - Steps: 8
32
- - Seed: 0
33
- - Offload flags: `--dit-cpu-offload false --dit-layerwise-offload false`
34
 
35
- Offline throughput, random dataset, 3 prompts, batch size 1:
36
 
37
- | checkpoint | total duration | latency/request | MP/s | denoise steady avg |
38
- | --- | ---: | ---: | ---: | ---: |
39
- | BF16 | 26.11 s | 8.70 s | 1.02 | ~0.379 s/step |
40
- | FP8 | 24.90 s | 8.30 s | 1.07 | ~0.319 s/step |
41
 
42
- Approximate speedup: 1.05x end-to-end throughput and 1.19x steady denoise step time.
43
- Transformer memory at load dropped from 23.88 GB to 15.45 GB.
 
 
 
 
 
 
 
 
 
 
 
 
44
 
45
  ## Conversion Notes
46
 
47
  The checkpoint was converted from a ModelOpt FP8 export with SGLang's `build_modelopt_fp8_transformer` tool using the `hunyuan-video` preset.
48
- The preset keeps numerically sensitive embedder/modulation/output layers in BF16 and maps ModelOpt/diffusers module names to SGLang runtime module names for fused QKV and fused QKV+MLP projections.
 
 
 
3
  base_model: hunyuanvideo-community/HunyuanVideo
4
  library_name: sglang
5
  pipeline_tag: text-to-video
6
+ tags:
7
+ - sglang
8
+ - diffusion
9
+ - hunyuanvideo
10
+ - modelopt
11
+ - fp8
12
  ---
13
 
14
  # HunyuanVideo ModelOpt FP8 SGLang Transformer
15
 
16
+ This repository contains a SGLang-ready ModelOpt FP8 transformer override for [`hunyuanvideo-community/HunyuanVideo`](https://huggingface.co/hunyuanvideo-community/HunyuanVideo).
17
+ It only replaces the DiT/transformer weights; text encoders, VAE, scheduler, tokenizer, and other non-transformer components are loaded from the original base model.
18
+
19
+ The checkpoint is intended for SGLang Diffusion with the HunyuanVideo FP8 support from [sgl-project/sglang#23199](https://github.com/sgl-project/sglang/pull/23199).
20
+
21
+ ## Usage
22
 
23
  ```bash
24
+ sglang generate --backend=sglang --model-path hunyuanvideo-community/HunyuanVideo --transformer-path BBuf/HunyuanVideo-ModelOpt-FP8-SGLang --prompt "A cat and a dog baking a cake together in a kitchen. The cat is carefully measuring flour, while the dog is stirring the batter with a wooden spoon. The kitchen is cozy, with sunlight streaming through the window." --seed=42 --text-encoder-cpu-offload --pin-cpu-memory --num-frames=65 --fps=13 --width=848 --height=480 --num-inference-steps=30 --save-output --warmup --enable-torch-compile
 
 
 
 
 
 
 
25
  ```
26
 
27
+ The command above follows the HunyuanVideo preset used by the `sglang-diffusion-benchmark-profile` skill. `65` frames at `13` fps gives an exact `5.000s` video.
28
+
29
+ ## H100 Validation Snapshot
30
+
31
+ Validation was run on one H100 GPU using rank0 (`CUDA_VISIBLE_DEVICES=0`) with `--backend=sglang`. Logs show `Using pipeline from model_index.json: HunyuanVideoPipeline`; no diffusers fallback markers were observed.
32
 
33
+ Artifacts:
34
 
35
+ - Validation tree: [`validation/h100_skill_5s_20260420`](https://huggingface.co/BBuf/HunyuanVideo-ModelOpt-FP8-SGLang/tree/main/validation/h100_skill_5s_20260420)
36
+ - Full command and run summary: [`result_summary_skill_5s.md`](https://huggingface.co/BBuf/HunyuanVideo-ModelOpt-FP8-SGLang/blob/main/validation/h100_skill_5s_20260420/result_summary_skill_5s.md)
37
+ - BF16 video: [`hunyuanvideo_bf16_skill_5s.mp4`](https://huggingface.co/BBuf/HunyuanVideo-ModelOpt-FP8-SGLang/resolve/main/validation/h100_skill_5s_20260420/artifacts/hunyuanvideo_bf16_skill_5s.mp4)
38
+ - FP8 video: [`hunyuanvideo_fp8_skill_5s.mp4`](https://huggingface.co/BBuf/HunyuanVideo-ModelOpt-FP8-SGLang/resolve/main/validation/h100_skill_5s_20260420/artifacts/hunyuanvideo_fp8_skill_5s.mp4)
39
+ - Profiler traces: [BF16](https://huggingface.co/BBuf/HunyuanVideo-ModelOpt-FP8-SGLang/resolve/main/validation/h100_skill_5s_20260420/profiler/bf16/445b0a02-cb9c-4793-9b49-1e5a102facb4-5_steps-global-rank0.trace.json.gz), [FP8](https://huggingface.co/BBuf/HunyuanVideo-ModelOpt-FP8-SGLang/resolve/main/validation/h100_skill_5s_20260420/profiler/fp8/0bb0f929-c3dc-42f5-b834-cfffb815c3e0-5_steps-global-rank0.trace.json.gz), [kernel summary](https://huggingface.co/BBuf/HunyuanVideo-ModelOpt-FP8-SGLang/blob/main/validation/h100_skill_5s_20260420/profiler/kernel_summary_skill_5s.md)
 
40
 
41
+ ![BF16 vs FP8 5s contact sheet](https://huggingface.co/BBuf/HunyuanVideo-ModelOpt-FP8-SGLang/resolve/main/validation/h100_skill_5s_20260420/artifacts/hunyuanvideo_bf16_fp8_skill_5s_contact_sheet.png)
42
 
43
+ Benchmark, warmup excluded:
 
 
 
44
 
45
+ | Metric | BF16 | FP8 | Delta | Speedup |
46
+ |---|---:|---:|---:|---:|
47
+ | E2E latency | 59.546 s | 54.748 s | -4.798 s (-8.1%) | 1.09x |
48
+ | Denoising stage | 42.542 s | 37.980 s | -4.562 s (-10.7%) | 1.12x |
49
+ | Avg denoise step | 1.4180 s | 1.2659 s | -0.1521 s | 1.12x |
50
+ | Decoding stage | 16.692 s | 16.458 s | -0.233 s (-1.4%) | 1.01x |
51
+ | Text encoding | 0.308 s | 0.306 s | -0.002 s (-0.7%) | 1.01x |
52
+
53
+ Profiler kernel share over 5 profiled denoise timesteps. Profiler timings include profiling overhead and are not used as benchmark latency numbers.
54
+
55
+ | Precision | Total CUDA op time | Top CUDA/kernel shares |
56
+ |---|---:|---|
57
+ | BF16 | 17.055 s | `cudaMemcpyAsync` 41.54%; FlashAttention 31.99%; BF16 GEMM kernels 9.77%, 8.16%, 2.11% |
58
+ | FP8 | 15.324 s | `cudaMemcpyAsync` 40.62%; FlashAttention 36.80%; FP8 Cutlass GEMM 12.83%; `_static_quant_fp8` 1.37% |
59
 
60
  ## Conversion Notes
61
 
62
  The checkpoint was converted from a ModelOpt FP8 export with SGLang's `build_modelopt_fp8_transformer` tool using the `hunyuan-video` preset.
63
+ The preset keeps numerically sensitive embedder, modulation, and output layers in BF16, and maps ModelOpt/diffusers module names to SGLang runtime module names for fused QKV and fused QKV+MLP projections.
64
+
65
+ One runtime caveat: the CLI can keep the same offload flags as the BF16 skill preset, but ModelOpt FP8 checkpoints currently force `dit_cpu_offload` off while preserving layerwise offload behavior for restored FP8 tensor strides.