Skip to content

[Hardware][NPU] Add HunyuanVideo-1.5 accuracy coverage - #9174

Merged
yenuo26 merged 4 commits into
vllm-project:mainfrom
zengchuang-hw:codex/hunyuan-video-npu-accuracy
Oct 27, 2026
Merged

yenuo26 merged 4 commits into
vllm-project:mainfrom
zengchuang-hw:codex/hunyuan-video-npu-accuracy

Conversation

@zengchuang-hw

@zengchuang-hw zengchuang-hw commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Purpose

HunyuanVideo-1.5 T2V/I2V accuracy tests cover H100/B200 and MI325 but skip Ascend NPU execution. The NPU nightly pipeline had function/performance jobs but no HunyuanVideo accuracy job.

  • Extend the existing six offline-generation, online-generation, and online/offline video-similarity tests to Ascend A3 using the shared hardware helper, preserving the existing CUDA/ROCm coverage.
  • Enable VAE tiling in both NPU generation paths. The original full-frame decode ran out of memory on a 64 GiB A2 after completing all 50 denoising steps (6.54 GiB allocation requested with 5.30 GiB free). CUDA keeps its existing configuration.
  • Add an A3 nightly accuracy job using the existing a3_npu_2 resource preset; the tests run with cards_1 and retain artifacts with the common recursive pattern tests/e2e/accuracy/**/*.
  • Remove platform-based skip guards from all six tests so an incorrect CI execution platform is not silently skipped.
  • Resolve the default I2V input image through the shared Hugging Face Hub cache on all platforms. Honor HF_HOME, HF_HUB_CACHE, and HF_HUB_OFFLINE, while retaining explicit image-source overrides.

The existing workload and thresholds are unchanged: 832x480, 33 frames, 24 FPS, 50 steps, seed 42, guidance 6.0, flow shift 5.0, SSIM >= 0.94, PSNR >= 28 dB. These tests compare vLLM-Omni online and offline output on the same device.

Test Plan

vLLM Version: 0.32.0+empty

vLLM-Omni Commit: 388710a (A2 runtime validation; base: 18c3bd5)

Current PR head: d560bf4

Rebased onto upstream main: c04bef8

Subsequent main merge: 9842ebc via 91547b8.

Author-run model validation was performed only on A2, at the validation commit above. Subsequent updates target A3, retain upstream MI325 coverage and its 30-minute engine/stage initialization timeouts, retain NPU-only VAE tiling, and remove platform-based skip guards. The branch subsequently merged upstream main at the revision listed above. The current follow-up changes default I2V input resolution to use the shared Hub cache on all platforms. Generation workload and similarity thresholds are unchanged. The current cache-resolution update has not been rerun for model execution on A2/A3 or CUDA/ROCm; full-model validation remains with CI. The A2 commands, logs, and results below are the original validation record.

A2 validation environment: one Ascend 910B3, 64 GiB HBM; driver/npu-smi 25.5.1; CANN 9.1.0; quay.io/atlas-ci/vllm-ascend:v0.32.0; Python 3.12.13; PyTorch 2.10.0+cpu with torch_npu 2.10.0.post4; Transformers 5.19.0; Diffusers 0.40.0; MindIE-SD 3.1.0; FFmpeg 4.4.2. ASCEND_RT_VISIBLE_DEVICES=0, HF_HUB_OFFLINE=1, and the tested checkout first on PYTHONPATH.

Cached model revisions:

  • T2V: 286be7ce72277246578a3e3cc2487e95ddae5bcf
  • I2V: 5a700ee883ff4c1b3d887ec4188755a7a5e2f698
python -m pytest -x -sv tests/e2e/accuracy/hunyuanvideo15_t2v/test_hunyuanvideo15_t2v_video_similarity.py \
  -m "full_model and diffusion and npu and A2 and cards_1" --run-level full_model \
  --durations=0 --junitxml=.cache/evidence/t2v.xml

python -m pytest -x -sv tests/e2e/accuracy/hunyuanvideo15_i2v/test_hunyuanvideo15_i2v_video_similarity.py \
  -m "full_model and diffusion and npu and A2 and cards_1" --run-level full_model \
  --hunyuanvideo15-i2v-image-source="$PWD/.cache/evidence/wan_i2v_input.JPG" \
  --durations=0 --junitxml=.cache/evidence/i2v.xml

The I2V image is the existing test's YiYiXu/testing-images/wan_i2v_input.JPG, downloaded locally through the HF mirror for this offline run (SHA-256: 077e3d965090c9028c69c00931675f42e1acc815c6eb450ab291b3b72d211a8e). The four I2V weight files completed by the range downloader were SHA-256 verified against the model repository before testing. The I2V run retains the CANN SDK's TBE entries on PYTHONPATH.

Test Result

Suite Result SSIM PSNR
T2V 3 passed in 430.86 s; exit 0 0.965513 40.183128 dB
I2V 3 passed in 521.11 s; exit 0 0.964783 39.215414 dB

T2V pytest output:

hunyuanvideo15_t2v similarity metrics:
  SSIM: value=0.965513, threshold>=0.940000
  PSNR: value=40.183128 dB, threshold>=28.000000 dB
================== 3 passed, 15 warnings in 430.86s (0:07:10) ==================

T2V offline generation took 145.22 s; peak reserved device memory was 48,794 MiB (47.65 GiB). One offline video and one online video were generated successfully, with metadata and similarity assertions passing.

I2V pytest output:

hunyuanvideo15_i2v similarity metrics:
  SSIM: value=0.964783, threshold>=0.940000
  PSNR: value=39.215414 dB, threshold>=28.000000 dB
================== 3 passed, 15 warnings in 521.11s (0:08:41) ==================

I2V offline generation took 159.12 s. One offline video and one online video were generated successfully, with metadata and similarity assertions passing. Total: 6 passed, no failed or skipped tests; all four video generations succeeded.

Validation gates for the A2-validated revision: all six A2 single-card nodes collected; local pre-commit passed; Linux/A2 pre-commit passed with the repository-pinned hooks (markdownlint-cli2, shellcheck, and actionlint skipped on A2; no matching files for these hooks in this change). PR precheck: no blocking findings.

Validation setup notes: the isolated v0.32 container reused installed dependency packages and FFmpeg from the same host because package mirrors were slow; required Diffusers/MindIE-SD versions match the repository. The unavailable aarch64 kernels==0.16.1 package was omitted; this NPU path does not use it. No vLLM or model-source compatibility patches were applied. Editable metadata was initially built from an archive and reports 0.1.dev0+d20261020.npu, producing a cosmetic version warning; the mounted source and Git HEAD matched the A2 runtime-validation commit above. CUDA execution was not rerun on this NPU host.

Logs, JUnit reports, and the environment manifest are retained in the isolated A2 checkout's .cache/evidence/; videos are retained in the two accuracy suites' result/ directories.

A3 targeting update: local pre-commit and Linux/A2 pre-commit passed on the updated source (the same non-matching hooks were skipped on A2). These are static checks; A3 model execution remains pending CI.

Rebase validation at 95c182cb141dc49c1120d06b0bb32903c5eb60e9: local pre-commit and Linux/A2 pre-commit passed, including hardware-marker and Buildkite schema checks. The A2 static-check skips remain markdownlint-cli2, shellcheck, and actionlint (no matching files in this change).

Review follow-up validation at 111c844ac7adb17e262025ec9cd57e277a12fcb1: local pre-commit passed on the three PR files, including hardware-marker, mypy, and Buildkite schema checks. A2 pre-commit could not be rerun because SSH timed out during banner exchange on three attempts; the Linux/A2 results above refer to the earlier revisions. The Linux pre-commit workflow passed on this revision. A3 model execution remains pending CI. The artifact pattern uses **/* to include the nested generated videos, following the Buildkite artifact upload syntax.

Cache-resolution follow-up validation at d560bf45dbab12a1716f65fcbbfc03d842205c03: local pre-commit and Linux/A2 pre-commit passed on all three PR files, including mypy, hardware-marker, forbidden-import, and Buildkite schema checks. The A2 run skipped markdownlint-cli2, shellcheck, and actionlint (no matching files in this change). Platform-independent resolver smoke checks passed using real Hub cache layouts for HF_HOME and HF_HUB_CACHE, explicit local/URL overrides, offline cache misses, and online cache reuse/download through a mocked HTTP transport with real network connections blocked. These are cache-resolution and static checks; no model execution was rerun for this update.

Offline CI must cache YiYiXu/testing-images/wan_i2v_input.JPG as a dataset artifact in addition to the model weights. With HF_HUB_OFFLINE=1, a missing image raises a Hub cache error; online environments may download it.

AI assistance: Codex assisted with the code changes, cache-resolution checks, and PR preparation.

@hsliuustc0106 hsliuustc0106 added the NPU PR related to Ascend NPU label Oct 21, 2026
@zengchuang-hw
zengchuang-hw force-pushed the codex/hunyuan-video-npu-accuracy branch from 388710a to c99fbd9 Compare October 21, 2026 01:22
@zengchuang-hw
zengchuang-hw marked this pull request as ready for review October 21, 2026 01:34
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-21T01:34:16.419329Z
We couldn’t complete this review. Comment @codex review to try again.
c99fbd9 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@vllm-omni-review-bot

Copy link
Copy Markdown

This PR appears to be related to model: HunyuanVideo.

Model owners: @BLANKETusers @yenuo26 @congw729

Routing: @BLANKETusers via model owner; @yenuo26 via CI owner, CODEOWNERS; @congw729 via CODEOWNERS

@zengchuang-hw, please review your own changes and leave a short self-review comment describing what you checked. PRs without author self-review may not be assigned a reviewer.

Please take a look when you have a chance. If you would like an automated review, mention @vllm-omni-review-bot in a comment.

Comment thread .buildkite/npu/test-npu-nightly.yml Resolved
@hsliuustc0106 hsliuustc0106 added the high priority high priority issue, needs to be done asap label Oct 21, 2026 — with ChatGPT Codex Connector
@BLANKETusers

Copy link
Copy Markdown
Contributor

LGTM

@zengchuang-hw
zengchuang-hw force-pushed the codex/hunyuan-video-npu-accuracy branch from c99fbd9 to 95c182c Compare October 22, 2026 01:20
@zengchuang-hw

Copy link
Copy Markdown
Contributor Author

@yenuo26 PTAL

Comment thread .buildkite/npu/test-npu-nightly.yml Resolved
Signed-off-by: zengchuang <zengchuang3@huawei.com>
@zengchuang-hw
zengchuang-hw force-pushed the codex/hunyuan-video-npu-accuracy branch from 95c182c to 111c844 Compare October 23, 2026 04:02
@zengchuang-hw

Copy link
Copy Markdown
Contributor Author

@yenuo26 Thanks for the review! Both suggestions have been addressed in 111c844ac:

  • Consolidated artifact paths into tests/e2e/accuracy/**/* to include the generated videos in nested directories.
  • Removed the platform-based skip guards from all six T2V/I2V tests.

Local pre-commit and the Linux CI pre-commit workflow passed. Could you please take another look at the PR?

@yenuo26 yenuo26 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yenuo26 yenuo26 added nightly-test label to trigger buildkite nightly test CI npu-test and removed nightly-test label to trigger buildkite nightly test CI npu-test labels Oct 24, 2026
@yenuo26 yenuo26 added nightly-test label to trigger buildkite nightly test CI npu-test labels Oct 27, 2026
return env


def _resolve_image_source(configured: str | None) -> str:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

validated with HF_HUB_OFFLINE=1

def _resolve_image_source(configured: str | None) -> str:
    if configured:
        candidate = Path(configured)
        if candidate.exists():
            return str(candidate.resolve())
        return configured

    return hf_api().hf_hub_download(
        repo_id="YiYiXu/testing-images",
        filename="wan_i2v_input.JPG",
        repo_type="dataset",
    )

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Signed-off-by: zengchuang <zengchuang3@huawei.com>
@yenuo26 yenuo26 removed nightly-test label to trigger buildkite nightly test CI npu-test labels Oct 27, 2026
@yenuo26 yenuo26 added nightly-test label to trigger buildkite nightly test CI npu-test ready label to trigger buildkite CI and removed nightly-test label to trigger buildkite nightly test CI npu-test labels Oct 27, 2026
@yenuo26
yenuo26 enabled auto-merge (squash) October 27, 2026 08:44
@yenuo26
yenuo26 merged commit b495c0d into vllm-project:main Oct 27, 2026
8 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

high priority high priority issue, needs to be done asap NPU PR related to Ascend NPU ready label to trigger buildkite CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants