问题 AttributeError: module ‘safetensors’ has no attribute ‘torch’ 环境 Python3.10 Conda 解决方法 在safetensors包的__init__.py文件中加入如下: from . import torch ps:safetensors包在site-packages里面。 举一反三 如果是缺少tf的话,可同样引入。