AttributeError: module ‘safetensors’ has no attribute ‘torch’
Python3.10 Conda
在safetensors包的__init__.py文件中加入如下:
safetensors
__init__.py
from . import torch
ps:safetensors包在site-packages里面。
site-packages
如果是缺少tf的话,可同样引入。
tf