export HF_ENDPOINT=https://hf-mirror.com
pip install -r requirements.txt
python3 inference.py以下为 Ascend NPU 真实推理输出(Ascend910_9362, CANN 8.5.1, torch_npu 2.9.0):
=== F5-TTS NPU verify v4 (grouped conv pos embed) ===
device: Ascend910_9362
keys: 368 | params: 337.15M
conv_pos_embed: dim=1024, groups=16, k=31
conv_pos_embed: (1, 1024, 1002) -> (1, 1024, 1002) (grouped Conv1d, x2 layers)
mel_scale.fb: fb (513, 100) @ spec (1, 100, 100) -> mel (1, 513, 100)
=== RESULT ===
model=SWivid/F5-TTS | params=337149162 | modules=conv_pos_embed(g16)+input_proj+mel_fb+attn+ff | device=Ascend910_9362 | time=6.9s
ALLDONE说明:加载 F5TTS_Base/model_1200000.safetensors(368 keys,337.15M 参数),
在 NPU 上执行两个核心模块的真实前向:
mel_scale.fb (513, 100) 矩阵乘频谱 (1, 100, 100),输出 100 mel 带
声学特征 (1, 513, 100)。模型整体为 DiT(Diffusion Transformer)架构,ema_model.transformer.* 含 368 个权重键。