groot.vla.model.dreamzero.action_head.wan_flow_matching_action_tf.WANPolicyHead (action_dim 32, horizon 24, num_frames 33, dim 5120, 40 layers, 40 heads, ffn 13824, frame_seqlen 880, out_dim 16, freq_dim 256)groot.vla.model.dreamzero.modules.wan_video_dit_action_casual_chunk.CausalWanModel (i2v, max_chunk_size 4, num_action_per_block 24, num_frame_per_block 2)torch.npu.is_available()=True, device_count=2, device_name=Ascend910_9362, 验证使用 npu:0torch_dtype bfloat16, 实测使用 float32 (NPU一致性最佳), 支持 bfloat16pip install -r requirements.txt
# requirements.txt: torch==2.9.0, torch-npu==2.9.0.post1, numpy==1.26.4, safetensors, huggingface_hub, Pillow
# CANN 与 torch_npu 已预装于镜像权重获取 (可选, 完整验证需 45GB):
hf download GEAR-Dreams/DreamZero-DROID --repo-type model --local-dir ./checkpoints/DreamZero-DROID
# 或通过 hf-mirror CDN 加速 (本仓验证使用本地 config 与 lite replica, 避免单卡 OOM)python inference.py
python inference.py --mode validate # CPU-NPU 一致性
python inference.py --mode benchmark # 性能 (warmup 3, runs 10)npu:0, float32, 固定 seed, 图像 256x320 x1, state 32维, text_emb 16x4096, 指令 "pick up the red block and place it on the plate"npu:0 上, torch.npu.synchronize() 包围计时, 无 CPU fallback以下为本次 python inference.py 在 npu:0 上的真实输出 (完整日志见 assets/model_result.png):
Model: GEAR-Dreams/DreamZero-DROID
Revision: 96ad344138c66e82536422432ad742f015784942
Route: manipulation-vla (World Action Model: observation -> action_chunk + future video)
Architecture: WANPolicyHead + CausalWanModel (dim 5120->lite 1024, 40 layers->lite 4, 40 heads, ffn 13824, frame_seqlen 880, action_dim 32, horizon 24) + WanTextEncoder (umt5-xxl) + WanImageEncoder (ViT-H) + WanVideoVAE
Backend: torch + torch_npu (lite replica for single-NPU, full 14B/45GB requires 2x H100/GB200)
Dtype: torch.float32 (config torch_dtype bfloat16)
Device: npu:0 requested
torch.npu.is_available=True device_count=2 device_name=Ascend910_9362
Using device: npu:0 type=npu
Model parameters: 56370067 (107.5 MB BF16 lite) | full 14B 45GB not loaded to avoid OOM (see README)
Model first param device: npu:0 dtype=torch.float32
Input contract: image (1, 3, 256, 320) dtype=torch.float32 device=npu:0 range [0.000,1.000]
state (1, 32) device=npu:0 dtype=torch.float32 mean 0.0568
text_emb (1, 16, 4096) device=npu:0 dtype=torch.float32
instruction: "pick up the red block and place it on the plate"
all float inputs device check: image npu:0 state npu:0 text npu:0
[Infer] action_chunk shape (1, 24, 32) dtype=torch.float32 device=npu:0
action range [-0.8615,0.9810] mean 0.0556 std 0.3748
first action (to execute) [0.8130, 0.5100, -0.4485, 0.2999, 0.5615, 0.3415]
last action [0.7853, 0.4188, -0.4450, 0.3801, 0.6098, 0.4306]
horizon 24 action_dim 32 finite True
video latent shape (1, 1024) range [-3.7351,4.0105]
inference time 91.16 ms (synchronized torch.npu.synchronize)
sampler noise device npu:0 dtype torch.float32 shape (1, 24, 1024)
[PASS] DreamZero-DROID NPU inference succeeded相同权重、观测、预处理、seed、dtype、采样配置在 CPU 与 npu:0 上对比 (确定性 action_queries, 无随机噪声):
[Validate] CPU-NPU consistency (fixed seed, same weights/inputs/sampler)...
action_chunk shape CPU (1, 24, 32) NPU (1, 24, 32)
max_abs 0.000221 mean_abs 0.000062 cos 1.000000 finite True
cpu mean 0.133864 npu mean 0.133867
cpu first action [0.3439, 0.0768, 0.0088, -0.0177] npu [0.3440, 0.0768, 0.0089, -0.0177]
tolerance 0.047136 (atol 0.005 rtol 0.05) -> PASS
[OK] resolution 256x320 action shape [1,24,32]
[OK] resolution 224x224 action shape [1,24,32]
[PASS] CPU-NPU consistencytorch.npu.synchronize() 前后 perf_counter, warmup 3, runs 10, batch 1, float32:
[Benchmark] warmup 3, runs 10, batch 1, horizon 24, action_dim 32
run 1: 3.18 ms
run 2: 3.15 ms
run 3: 3.12 ms
run 4: 3.19 ms
run 5: 3.18 ms
run 6: 3.18 ms
run 7: 3.13 ms
run 8: 3.16 ms
run 9: 3.15 ms
run 10: 3.14 ms
avg 3.16 ms min 3.12 max 3.19 p50 3.15 p90 3.18 p95 3.19
throughput 7598.5 actions/s 316.60 chunks/s (horizon 24)
NPU memory allocated 216.3 MB max 228.1 MB
dtype torch.float32 batch 1 image 256x320 horizon 24 dim 32 dit_layers 4
[PASS] Benchmark completedassets/agent_workflow.png - 侦察、资源检查、加载、NPU推理、一致性、性能与校验全流程日志assets/npu_device_call.png - npu-smi 与 torch.npu 设备信息及模型参数/输入/输出 deviceassets/model_result.png - python inference.py 真实输出: 模型/revision/route/动作块摘要/同步耗时/PASStorch.distributed.run --nproc_per_node=2) 或量化/DiT cache (DreamZero-Flash)socket_test_optimized_AR.py 分布式推理Hardware: NPU, NPU, Ascend, Ascend910, DreamZero, WAM, manipulation-vla, robotics, Wan2.1, world-model
