ARTICLE DETAIL

资讯详情

深耕网站建设与运营推广的一线实战洞察。

YOLO12复现报错

YOLO12复现报错 参考文章YOLOv12快速复现部署训练测试_yolov12复现-CSDN博客https://blog.csdn.net/WhiffeYF/article/details/145866853运行这个命令时报错报错内容ERROR: flash_attn-2.7.3cu11torch2.2cxx11abiFALSE-cp311-cp311-linux_x86_64.whl is not a supported wheel on this platform.原因安装的flash_attn预编译 Wheel 文件与当前 Python 环境的平台、Python 版本、CUDA 版本或 PyTorch 版本不兼容。分别运行命令python -Vpythonimport torch print(torch.version.cuda) print(torch.__version__)得到​​ Python 3.12.3CUDA 12.1​​PyTorch 2.3.0cu21所以一开始的配置是不对的PyTorch 2.3.0就对不上了重开一个实例PyTorch 2.2.0 CUDA为11.8因为安装原文中的flash_attn包对应的CUDA 版本必须是11.x。关于原环境CUDA12.1要找到对应的包进行下载因为网络原因一直下载失败以下内容为参考。1、可以尝试不安装flash_attn包参考文章Windows系统下安装运行YOLOv12所需的flash_attn 包教程_assertionerror: import flashattention error! pleas-CSDN博客https://blog.csdn.net/Anperlanch/article/details/1457606232、尝试不更改配置(CUDA12.1)正确安装首先删除前三行运行命令:pip install torch2.3.1 torchvision0.18.1 torchaudio2.3.1 -f https://mirrors.aliyun.com/pytorch-wheels/cu121进入社区预编译参考文章Pythonflash_attn 安装方法_flash-attn-CSDN博客Linux版本Releases · Dao-AILab/flash-attention例如找到Linux版本flash_attn-2.7.4.post1cu12torch2.3cxx11abiFALSE-cp312-cp312-linux_x86_64.whl可以直接运行(下面这个是模板要输入对应的文件名下载较慢)wget https://github.com/Dao-AILab/flash-attention/releases/download/v2.x.x/flash_attn-xxxxxxx-linux_x86_64.whlWindows版本Releases · kingbri1/flash-attention注意这是Windows版本哦暂时用不上运行命令wget https://github.com/kingbri1/flash-attention/releases/download/v2.5.9.post1/flash_attn-2.5.9.post1cu122torch2.3.1cxx11abiFALSE-cp311-cp311-win_amd64.whl再运行pip install -r requirements.txt报错ERROR: Could not find a version that satisfies the requirement onnxruntime1.15.1 (from versions: 1.17.0, 1.17.1, 1.17.3, 1.18.0, 1.18.1, 1.19.0, 1.19.2, 1.20.0, 1.20.1, 1.21.0, 1.21.1, 1.22.0, 1.22.1)ERROR: No matching distribution found for onnxruntime1.15.1是因为onnxruntime1.15.1这个版本的包较旧建议requirements.txt改为下面这样
返回列表