适用于 Atlas 800T A2 服务器(910B2),vllm-omni v0.28.0 参考:MiniMax-H3-NPU A3 部署指南
| 分区 | 任务 | 输入能力 |
|---|---|---|
| combined(FL2VA + Ref2VA 双 DiT 同时加载) | T2VA | 0 图,文本生成音视频 |
| combined | FL2VA | 1 图首帧,或 2 图首帧+尾帧生成音视频 |
| combined | Ref2VA | 单图/多图、图片加音频、单视频/多视频参考生成 |
本报告基于 910B2 (Atlas 800T A2) 4 卡部署,对比 v0.28.0 优化包中各层叠加的收益。
| 项 | 验证基线 |
|---|---|
| 硬件 | Atlas 800T A2 (910B2),8 个逻辑 NPU(测试用 4 卡),每卡 64 GB HBM |
| 驱动 | 25.5.2 |
| CANN Toolkit | 9.0.1 |
| Python | 3.12.13 |
| 容器镜像 | quay.io/ascend/vllm-omni:v0.28.0 |
| 补丁 | vllm-omni-h3-optimization-full-v0.28.0.patch(317 行,5 文件)+ vllm-omni-h3-res-multistep-v0.28.0.patch(228 行,3 文件) |
| 优化包 | package-v0.28-910B2/ |
| 项 | A3(参考仓库) | A2(本机) |
|---|---|---|
| 芯片 | 910B3 | 910B2 |
| 镜像 | v0.26.0-a3 | v0.28.0(通用版) |
| 服务形态 | 分区独立服务(FL2VA / Ref2VA 分开) | combined 服务(双 DiT 同时加载) |
| DLO | --enable-layerwise-offload(普通) | --enable-distributed-layerwise-offload --dlo-no-use-allgather |
| INT8 量化 | 不支持 | 支持(v0.28 新特性) |
| RainFusion 稀疏 FA | 不支持 | 支持(mindiesd 3.1.0 内置) |
| Cache-DiT | 不支持 | 支持(双 DiT 缓存) |
| 容器要求 | 无特殊 | 必须 --ipc=host |
--ipc=host:默认 /dev/shm 仅 64MB,vllm-omni 需要 ≥240MBdocker exec -d 的 pipe 无 reader,日志丢光PYTORCH_NPU_ALLOC_CONF=expandable_segments:True 必须:INT8 量化时 npu_dynamic_quant 因碎片化 OOM--dlo-no-use-allgather 必须:910B2 上默认 AllGather 路径导致 aclnnCat 超时卡死/mnt/weight/MiniMax-H3/
├── FL2VA/ # FL2VA 分区(transformer/text_encoder/VAE 等)
├── Ref2VA/ # Ref2VA 分区(transformer/text_encoder/VAE 等)
├── transformer/ # 主 DiT(14 个 shard)
├── transformer_ref/# Ref DiT(14 个 shard)
├── text_encoder/ # Qwen3-VL 文本编码器
├── vae/ # 视频 VAE
└── audio_vae/ # 音频 VAE/mnt/weight/Minimax-h3-Turbo/
├── minimax_h3_fl2v_turbo_4step_v1.0_768p_bf16.safetensors
└── minimax_h3_ref2v_turbo_8step_v1.0_768p_bf16.safetensorsdocker run -itd --name minimax-h3-v028 \
--privileged --network host --ipc=host \
--device /dev/davinci4 --device /dev/davinci5 \
--device /dev/davinci6 --device /dev/davinci7 \
--device /dev/davinci_manager --device /dev/devmm_svm \
--device /dev/hisi_hdc \
-v /usr/local/Ascend/driver:/usr/local/Ascend/driver \
-v /usr/local/Ascend/addkernell:/usr/local/Ascend/addkernell \
-v /mnt/weight:/mnt/weight \
quay.io/ascend/vllm-omni:v0.28.0 \
/bin/bash -c "sleep infinity"docker exec minimax-h3-v028 bash -c '
cd /vllm-workspace/vllm-omni
git apply /path/to/vllm-omni-h3-optimization-full-v0.28.0.patch
git apply /path/to/vllm-omni-h3-res-multistep-v0.28.0.patch
'两个补丁按上述顺序应用,相互正交(res_multistep 补丁基于五文件补丁后的文件状态生成)。
docker exec -d minimax-h3-v028 bash /tmp/start_h3_npu_4card_rainfusion.shsource /usr/local/Ascend/ascend-toolkit/set_env.sh
export ASCEND_RT_VISIBLE_DEVICES=4,5,6,7
export MASTER_PORT=29697
export PORT=9098
export MODEL=/mnt/weight/MiniMax-H3
export VLLM_WORKER_MULTIPROC_METHOD=spawn
export VLLM_OMNI_VIDEO_SYNC_TIMEOUT=1800
export VLLM_OMNI_ASYNC_OUTPUT_TIMEOUT=1800
export HCCL_OP_EXPANSION_MODE=AIV
export VLLM_OMNI_PRINT_STAGE_TIMING=1
export OMP_NUM_THREADS=1
export PYTORCH_NPU_ALLOC_CONF=expandable_segments:True
exec vllm serve "${MODEL}" \
--omni --host 0.0.0.0 --port "${PORT}" \
--trust-remote-code --num-gpus 4 \
--usp 4 --ring 1 --text-encoder-tp-size 4 \
--enable-distributed-layerwise-offload --dlo-no-use-allgather \
--quantization int8 \
--vae-parallel-mode tile --vae-use-tiling --vae-patch-parallel-size 4 \
--diffusion-attention-backend RAINFUSION_ATTN \
--cache-backend cache_dit --enable-cache-dit-summary \
--init-timeout 3600 --stage-init-timeout 3600# 去掉 --quantization int8
# 换 --diffusion-attention-backend FLASH_ATTNcurl -fsS http://127.0.0.1:9098/v1/modelscurl -sS -X POST http://127.0.0.1:9098/v1/videos/sync \
-F 'prompt=In a snowy blue-purple forest, Ori carefully walks past a sleeping giant.' \
-F 'width=1344' -F 'height=768' -F 'aspect_ratio=16:9' -F 'fps=24' \
-F 'num_inference_steps=21' -F 'flow_shift=12' -F 'seed=1101' \
-F 'extra_params={"task":"t2va","duration":5.0,"audio_flow_shift":3.0,"sampler_mode":"res_multistep"}' \
-o t2va.mp4curl -sS -X POST http://127.0.0.1:9098/v1/videos/sync \
-F 'prompt=A quiet cinematic night scene with a lighthouse, matching ambient sound.' \
-F 'fps=24' -F 'num_inference_steps=21' -F 'flow_shift=12' -F 'seed=2101' \
-F 'extra_params={"task":"fl2va","duration":5.0,"audio_flow_shift":3.0,"sampler_mode":"res_multistep"}' \
-F "input_reference=@first-frame.png;type=image/png" \
-o fl2va.mp4curl -sS -X POST http://127.0.0.1:9098/v1/videos/sync \
-F 'prompt=A quiet cinematic night scene with a lighthouse.' \
-F 'fps=24' -F 'num_inference_steps=21' -F 'flow_shift=12' -F 'seed=2201' \
-F 'extra_params={"task":"fl2va","duration":5.0,"frame_indices":[0,-1],"audio_flow_shift":3.0,"sampler_mode":"res_multistep"}' \
-F "input_references=@first-frame.png;type=image/png" \
-F "input_references=@last-frame.png;type=image/png" \
-o fl2va-firstlast.mp4curl -sS -X POST http://127.0.0.1:9098/v1/videos/sync \
-F 'prompt=A white cat sits on a beige couch and slowly looks toward the camera.' \
-F 'aspect_ratio=adaptive' -F 'short_edge=768' \
-F 'fps=24' -F 'num_inference_steps=21' -F 'flow_shift=12' -F 'seed=3101' \
-F 'extra_params={"task":"ref2va","duration":5.0,"audio_flow_shift":3.0,"sampler_mode":"res_multistep"}' \
-F "input_reference=@picture1.png;type=image/png" \
-o ref2va-img.mp4python3 -m http.server 18080 --bind 127.0.0.1 --directory /path/to/audio
curl -sS -X POST http://127.0.0.1:9098/v1/videos/sync \
-F 'prompt=A white cat with black mustache sits on a beige couch, lip-syncing to the reference audio.' \
-F 'aspect_ratio=adaptive' -F 'short_edge=768' \
-F 'fps=24' -F 'num_inference_steps=21' -F 'flow_shift=12' -F 'seed=3102' \
-F 'extra_params={"task":"ref2va","duration":5.0,"audio_flow_shift":3.0,"sampler_mode":"res_multistep"}' \
-F "input_reference=@picture1.png;type=image/png" \
-F 'audio_reference={"audio_url":"http://127.0.0.1:18080/audio.mp3"}' \
-o ref2va-audio.mp4# T2VA + fl2v Turbo 4 步
curl -sS -X POST http://127.0.0.1:9098/v1/videos/sync \
-F 'prompt=In a snowy blue-purple forest, Ori carefully walks past a sleeping giant.' \
-F 'width=1344' -F 'height=768' -F 'aspect_ratio=16:9' -F 'fps=24' \
-F 'num_inference_steps=5' -F 'flow_shift=6' -F 'seed=1101' \
-F 'extra_params={"task":"t2va","duration":5.0,"audio_flow_shift":3.0}' \
-F 'lora={"name":"turbo4","local_path":"/path/to/minimax_h3_fl2v_turbo_4step_v1.0_768p_bf16.safetensors"}' \
-o t2va-turbo.mp4
# Ref2VA + ref2v Turbo 8 步
curl -sS -X POST http://127.0.0.1:9098/v1/videos/sync \
-F 'prompt=A white cat sits on a beige couch and slowly looks toward the camera.' \
-F 'aspect_ratio=adaptive' -F 'short_edge=768' \
-F 'fps=24' -F 'num_inference_steps=9' -F 'flow_shift=6' -F 'seed=3101' \
-F 'extra_params={"task":"ref2va","duration":5.0,"audio_flow_shift":3.0}' \
-F "input_reference=@picture1.png;type=image/png" \
-F 'lora={"name":"turbo8","local_path":"/path/to/minimax_h3_ref2v_turbo_8step_v1.0_768p_bf16.safetensors"}' \
-o ref2va-turbo.mp4vllm-omni-h3-res-multistep-v0.28.0.patch 为 H3 增加二阶采样器选项,通过 extra_params 的 sampler_mode 字段选择:
| 值 | 行为 |
|---|---|
euler(默认;不传字段同此) | 一阶 Euler,与 v0.28.0 原生路径逐字节一致 |
res_multistep | 二阶多步采样(对数 σ 坐标,与 DPM-Solver++(2M)/UniPC 同族);非法值直接拒绝(OmniClientError) |
为什么能用更少步数:Euler 每步只按当前斜率走直线,步长变大(如 50→21 步)时离散化误差线性放大;res_multistep 每步额外参考上一步的 x0 预测做二阶修正——多看一步历史不增加网络前向(每步仍 1 次),全局误差从 O(h) 降到 O(h²),同等精度所需步数显著更少。首步与终段(无历史 / σ→0)自动退化 Euler,有单元契约测试覆盖。
推荐配置:num_inference_steps=21 + "sampler_mode":"res_multistep"(§5.1~§5.5 示例即此配置)。实测(910B3 4 卡,v0.28.0 + 同款补丁,15 格 = 3 prompts × 5 seeds):
| 指标 | Euler 21 步 | res_multistep 21 步 |
|---|---|---|
| 时延均值 | 158.9 s | 158.7 s(比值 0.998,零代价) |
| ΔPSNR(对 Euler 21 步) | — | mean +0.26 dB,8/15 胜,95% CI [−0.43, +0.96](统计等价) |
对 50 步 Euler 基线时延 −57.6%;进一步压时延可叠加 cache_dit / INT8(见 4.1 生产配置)。