skillfed

soc4onnx

A very simple tool that forces a change in the opset of an ONNX graph. Simple Opset Changer for ONNX.

soc4onnx v1.0.2 82.7K downloads/30d#14,144 on PyPI7
Permissive license MIT License Abandoned released

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 soc4onnx

uv

uv add soc4onnx

poetry

poetry add soc4onnx

Installing 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

onnx opset version changeonnx model opset converterchange onnx opset numberonnx graph opset modifieronnx compatibility version tool
onnx-toolsmodel-conversion

More Artificial Intelligence packages