{"id":24145,"library":"onnxsim-prebuilt","title":"ONNX Simplifier Prebuilt","description":"Prebuilt wheels of onnxsim (ONNX Simplifier) distributed as a standalone pip package for platforms that lack a compatible compiler. Current version is 0.4.39.post2, with irregular releases tied to upstream onnxsim updates.","status":"active","version":"0.4.39.post2","language":"python","source_language":"en","source_url":"https://github.com/tsukumijima/onnx-simplifier-prebuilt","tags":["onnx","simplify","prebuilt","wheels"],"install":[{"cmd":"pip install onnxsim-prebuilt","lang":"bash","label":"Basic installation"}],"dependencies":[{"reason":"Required to load and save ONNX models","package":"onnx","optional":false},{"reason":"Core library; onnxsim-prebuilt is a packaging of onnxsim with prebuilt wheels","package":"onnxsim","optional":false}],"imports":[{"note":"The package name on pypi is onnxsim-prebuilt, but the import module is still onnxsim.","wrong":"from onnxsim_prebuilt import simplify","symbol":"simplify","correct":"from onnxsim import simplify"}],"quickstart":{"code":"import onnx\nfrom onnxsim import simplify\n\n# Load your ONNX model\nmodel = onnx.load('model.onnx')\n# Simplify the model\nmodel_simp, check = simplify(model)\nif check:\n    onnx.save(model_simp, 'model_simplified.onnx')\n    print('Simplified model saved.')\nelse:\n    print('Simplification failed to preserve outputs.')","lang":"python","description":"Basic usage: load a model, simplify, save."},"warnings":[{"fix":"Use 'from onnxsim import simplify' instead of 'from onnxsim_prebuilt import simplify'.","message":"Do NOT import from 'onnxsim_prebuilt'. The import module is 'onnxsim', matching the upstream package. The 'onnxsim-prebuilt' name only applies to the pip package.","severity":"gotcha","affected_versions":"all"},{"fix":"After calling simplify, verify that the returned 'check' is True before using the simplified model.","message":"The 'simplify' function may produce a model that does not preserve output exactness for all ops. Always check the returned boolean flag.","severity":"gotcha","affected_versions":"all"},{"fix":"Use the return value of simplify instead of calling check_out separately.","message":"The function 'check_out' (if used) is deprecated in favor of the built-in check in simplify.","severity":"deprecated","affected_versions":">=0.4.36"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'pip install onnxsim-prebuilt' to get the prebuilt wheels.","cause":"Forgot to install the package, or installed 'onnxsim-prebuilt' but attempted to import something else.","error":"ModuleNotFoundError: No module named 'onnxsim'"},{"fix":"Upgrade to the latest version: 'pip install --upgrade onnxsim-prebuilt'.","cause":"Very old version of onnxsim or onnxsim-prebuilt that does not have the simplify function.","error":"AttributeError: module 'onnxsim' has no attribute 'simplify'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}