The operator 'aten::unfold_backward' is not currently supported on the NPU backend and will fall back to run on the CPU.
收藏回复举报
The operator 'aten::unfold_backward' is not currently supported on the NPU backend and will fall back to run on the CPU.
t('forum.solved') 已解决
发表于2025-08-27 12:31:10
0 查看

【问题描述】

模型运行时提示:
Warning: CAUTION: The operator 'aten::_upsample_bilinear2d_aa.out' is not currently supported on the NPU backend and will fall back to run on the CPU. 

Warning: CAUTION: The operator 'aten::_fft_c2r’ is not currently suported on the NPU backend and will fall back to run on the cpu.

【版本信息】

CANN:8.1.RC1

Torch:2.5.1

Torch_npu:2.5.1.post1

torchaudio:2.5.1

【测试代码】

from cosyvoice.cli.cosyvoice import CosyVoice
from cosyvoice.utils.file_utils import load_wav
import torch_npu
import torchaudio

def main():
    cosyvoice = CosyVoice("./pretrained_models/CosyVoice-300M", fp16=True)
    prompt_speech_16k = load_wav('zero_shot_prompt.wav', 16000)

    for i, j in enumerate(cosyvoice.inference_zero_shot('收到好友从远方寄来的生日礼物,那份意外的惊喜与深深的祝福让我心中充满了甜蜜的快乐,笑容如花儿般绽放。', '希望你以后能够做的比我还好呦。',prompt_speech_16k, stream=False)):
        torchaudio.save('zero_shot_{}.wav'.format(i), j['tts_speech'], 22050)

if __name__ == "__main__":
    torch_npu.npu.set_compile_mode(jit_compile=False)
    torch_npu.npu.config.allow_internal_format = False
    main()

【输出结果信息】

true

推理速度很慢,使用到了CPU,没有用到NPU,请问下这个问题有什么解决方案吗?

我要发帖子