Closed yy1844 closed 1 month ago
I ran into this same issue. It worked on a different machine yesterday but won't work today. It seems that the pypi transformers package was updated to 4.46.0 overnight and is causing issues. Manually installing 4.45.2 worked for me.
pip install transformers==4.45.2
This is a bug with transformers 4.46 - will fix today
邮件已收到,谢谢!
Fixed in latest
在本地运行 surya_gui 时,我遇到了以下报错。Streamlit 正常启动,但加载模型时报 KeyError: 'sdpa'。具体错误信息如下:
环境: Windows 11 Python 3.12.6 Transformers 4.46.0 Torch 2.5.0+cu118 Surya-ocr 0.6.10
KeyError: 'sdpa' ... File "surya\model\ordering\decoder.py", line 209, in init self.self_attn = MBART_ATTENTION_CLASSES[config._attn_implementation]