whisper 模型转 onnx 错误 解决方法
·
报错:TypeError: scaled_dot_product_attention(): argument 'is_causal' must be bool, not Tensor
解决方法:
from whisper.model import disable_sdpa
if __name__ == '__main__':
with disable_sdpa():
main()
这是 Sherpa-onnx 项目提供的解决方案,通过上下文管理器临时禁用 scaled_dot_product_attention(SDPA) 功能,使用传统的注意力实现来避免类型问题。
更多推荐
所有评论(0)