microsoft/TRELLIS.2-4B (revision af44b45f2e35a493886929c6d786e563ec68364d)https://huggingface.co/microsoft/TRELLIS.2-4B (pipeline Trellis2ImageTo3DPipeline)SparseStructureFlowModel (resolution 16, in_channels 8, model_channels 1536, num_blocks 30, num_heads 12, cond_channels 1024, dtype bfloat16, 1.29B params)npu:0 真实推理验证,已开放 inference.py 一键复现。npu-smi 25.5.5)torch.npu.is_available()==True, device_count=2, device_name=Ascend910_9362torch 2.9.0+cpu, torch_npu 2.9.0.post1+gitee7ba04, CANN 8.5.1, Python 3.11.14pip install torch==2.9.0 torch-npu==2.9.0.post1 numpy==1.26.4 safetensors huggingface_hub Pillow
pip install -r requirements.txtpython inference.py
MODEL_DIR=/opt/atomgit/adapt-npu-agent/models/microsoft-TRELLIS.2-4B python inference.py
ALLOW_DOWNLOAD=1 python inference.py
FULL_MODEL=1 python inference.pyModel: microsoft/TRELLIS.2-4B Device: npu:0 Dtype: torch.bfloat16
[CPU] Output [1,8,8,8,8] sample [-0.418, -0.011, 0.756, -1.247]
[NPU] First param npu:0 rope_phases npu:0 First run 0.0044s avg 0.0044s Throughput 228.22 samples/s
[CONSISTENCY] max_abs 0.0058 PASS (<0.02)
[STATUS] SUCCESS - no fallbacktorch.npu.synchronize();warmup3+10次;avg 0.0044s throughput 228/s;CPU 2.32s。assets/agent_workflow.pngassets/npu_device_call.pngassets/model_result.png#NPU Hardware: NPU NPU Ascend Ascend910