Closed ImGoodBai closed 1 year ago
https://pypi.org/project/SwissArmyTransformer/0.3.6/#files 源码安装就好了,5月17发布的。。。pip还没更新吧
包名是SwissArmyTransformer,而不是sat。只是该库import
的时候是用sat
,这两个名字可能不同。
这个Run pip install sat
是Huggingface transformers的提示,是错误的,但是我没法改。
请使用pypi源(而非tuna,它更新太慢)安装最新版本的SwissArmyTransformer。
VisualGLM-6B/model/blip2.py", line 4, in
@xiaohujecky 代码里是from sat.model import ViTModel,为什么你的报错是from SwissArmyTransformer呢?
@xiaohujecky 可能是版本不对,pip show SwissArmyTransformer
看看版本是不是0.3.6不是的话,要重新装,请用标准或者阿里云pip镜像装。
$ python web_demo_hf.py Traceback (most recent call last): File "web_demo_hf.py", line 6, in
model = AutoModel.from_pretrained("THUDM/visualglm-6b", trust_remote_code=True).half().cuda()
File "/home/good/anaconda3/envs/visualglm/lib/python3.8/site-packages/transformers/models/auto/auto_factory.py", line 459, in from_pretrained
model_class = get_class_from_dynamic_module(
File "/home/good/anaconda3/envs/visualglm/lib/python3.8/site-packages/transformers/dynamic_module_utils.py", line 425, in get_class_from_dynamic_module
final_module = get_cached_module_file(
File "/home/good/anaconda3/envs/visualglm/lib/python3.8/site-packages/transformers/dynamic_module_utils.py", line 305, in get_cached_module_file
get_cached_module_file(
File "/home/good/anaconda3/envs/visualglm/lib/python3.8/site-packages/transformers/dynamic_module_utils.py", line 267, in get_cached_module_file
modules_needed = check_imports(resolved_module_file)
File "/home/good/anaconda3/envs/visualglm/lib/python3.8/site-packages/transformers/dynamic_module_utils.py", line 150, in check_imports
raise ImportError(
ImportError: This modeling file requires the following packages that were not found in your environment: sat. Run
pip install sat