notAI-tech / NudeNet

Lightweight nudity detection
https://nudenet.notai.tech/
GNU Affero General Public License v3.0
1.79k stars 348 forks source link

Model Unsupported model IR version: 10, max supported IR version: 9 #156

Open otakarkuchar opened 3 months ago

otakarkuchar commented 3 months ago

onnxruntime.capi.onnxruntime_pybind11_state.Fail: [ONNXRuntimeError] : 1 : FAIL : Load model from ./640m.onnx failed:C:\a_work\1\s\onnxruntime\core\graph\model.cc:150 onnxruntime::Model::Model Unsupported model IR version: 10, max supported IR version: 9

bedapudi6788 commented 3 months ago

you can upgrade your onnxruntime or export with a older onnx version

BooHwang commented 1 month ago

you can set IR version use below code

import onnx

model = onnx.load('640m.onnx')
model.ir_version = 8
onnx.save(model, '640m_v8.onnx')