Install & Compatibility
Where this runs
tested against v0.4.39.post2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
py 3.11
✕ build_error
✓ 7.9s
py 3.12
✕ build_error
✓ 7.5s
py 3.13
✕ build_error
✓ 7.6s
py 3.9
✕ build_error
✕ build_error
289MB installed
● package 289MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
simplify
✓ from onnxsim import simplify
✗ from onnxsim_prebuilt import simplify
The package name on pypi is onnxsim-prebuilt, but the import module is still onnxsim.
Basic usage: load a model, simplify, save.
import onnx
from onnxsim import simplify
# Load your ONNX model
model = onnx.load('model.onnx')
# Simplify the model
model_simp, check = simplify(model)
if check:
onnx.save(model_simp, 'model_simplified.onnx')
print('Simplified model saved.')
else:
print('Simplification failed to preserve outputs.')
onnxsim --version
Upgrade
Version history
0.4.39.post2latest on PyPI · released Jan 29, 2026
Audit
Dependencies
onnxrequiredRequired to load and save ONNX models
onnxsimrequiredCore library; onnxsim-prebuilt is a packaging of onnxsim with prebuilt wheels