soc4onnx
A very simple tool that forces a change in the opset of an ONNX graph. Simple Opset Changer for ONNX.
What it is and what it does
soc4onnx is a lightweight utility for modifying the opset version declared in an ONNX model file. ONNX models specify an opset version that indicates which operators and semantics they conform to; this tool allows you to change that version number in the model metadata without restructuring the graph itself. It works both as a command-line tool (taking input and output file paths plus a target opset number) and as a Python library (accepting either file paths or in-memory ONNX ModelProto objects).
The package has no runtime dependencies beyond ONNX itself, making it lightweight to install. However, it has been abandoned since September 2022 with no subsequent maintenance, so it may not work correctly with recent ONNX versions or Python releases, and any issues discovered will not be fixed.
Use it for:
- Convert an ONNX model to a different opset version to match a target inference runtime's supported opset.
- Batch-process multiple ONNX files to standardize their opset versions across a model collection.
- Adjust opset in a model loaded in memory before serializing it to disk in a Python workflow.
- Downgrade or upgrade a model's declared opset to test compatibility with different ONNX runtime versions.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Changes the opset version of an ONNX model graph, either via command-line or Python API, without altering the model's structure or weights.
Yes, if you need a simple one-off opset conversion and are working with a stable ONNX version. No, if you require ongoing maintenance, support for recent ONNX releases, or assurance that the tool will handle edge cases—the package is abandoned and will not receive updates. Consider it a utility for legacy workflows rather than a foundation for new projects.
Install
soc4onnx on PyPI
pip
pip install soc4onnxuv
uv add soc4onnxpoetry
poetry add soc4onnxInstalling soc4onnx
Before you install
Low install friction with no runtime dependencies. However, the package is abandoned—last release was 2022-09-09 and no commits since then—so it will not receive bug fixes or updates for newer ONNX versions or Python releases.
License in practice
MIT License permits commercial and private use with minimal restrictions, requiring only attribution and inclusion of the license notice.
Quickstart
pip install soc4onnx
from soc4onnx import change
changed_graph = change(
input_onnx_file_path='model.onnx',
output_onnx_file_path='model_opset13.onnx',
opset=13
)
Requires ONNX library to be installed separately; package is abandoned and may not work with recent ONNX versions.
Verify before relying
- Whether the tool handles all ONNX opset transitions correctly or only specific ranges.
- Whether changing opset can cause model validation or runtime failures on certain architectures.
- Current compatibility with recent ONNX library versions given the package's abandonment.
Package facts
| License | MIT License (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 1,435 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 82,678/month — #14,144 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: soc4onnx-1.0.2-py3-none-any.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
sbi4onnxModifies ONNX model files to initialize or…
permissive · top 15,000 on PyPI
sio4onnxModifies the input and output shapes of ONNX…
permissive · top 15,000 on PyPI
soa4onnxAdds or modifies output nodes in ONNX model…
permissive · top 15,000 on PyPI
sod4onnxsod4onnx removes specified output operations…
permissive · top 15,000 on PyPI
svs4onnxSwaps connections between output and input…
permissive · top 15,000 on PyPI
sam4onnxRewrites attributes and constants in ONNX model…
permissive · top 15,000 on PyPI
sng4onnxAutomatically generates and assigns operation…
permissive · top 15,000 on PyPI
scc4onnxConverts ONNX model input tensor dimensions and…
permissive · top 15,000 on PyPI
snd4onnxRemoves specified nodes from ONNX model graphs…
permissive · top 15,000 on PyPI
json2onnxConverts JSON files to ONNX model format,…
permissive · top 15,000 on PyPI