skillfed

sod4onnx

Simple model output OP additional tools.

sod4onnx v1.0.0 82.6K downloads/30d#14,153 on PyPI2
Permissive license MIT License Abandoned released

What it is and what it does

sod4onnx is a lightweight utility for modifying ONNX model graphs by removing specified output operations. It provides both a command-line interface and a Python API (the `outputs_delete` function) to accept an ONNX model file or graph object, delete named outputs, and write the result back to disk or return it as a modified graph object.

The tool is designed for model optimization workflows where intermediate or unwanted outputs need to be pruned from a trained model before deployment. It has no runtime dependencies beyond Python itself, making installation friction minimal. However, the package has not been maintained since its initial release in September 2022, raising concerns about compatibility with newer ONNX specifications or Python versions.

Use it for:

  • Remove intermediate output layers from ONNX models before deployment to reduce model size or inference overhead.
  • Prune unnecessary outputs from multi-output models to simplify downstream inference pipelines.
  • Prepare ONNX models for edge deployment by stripping outputs not needed on target hardware.
  • Automate ONNX graph cleanup in model conversion pipelines where intermediate outputs are generated but not used.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

sod4onnx removes specified output operations from ONNX model files, either via command-line or Python API, producing a modified ONNX model with those outputs deleted.

No. While the tool is simple and has no install friction, it has been abandoned for nearly four years with no maintenance or updates. Compatibility with current ONNX versions is uncertain, and the lack of ongoing support makes it risky for production use. Consider alternatives that are actively maintained if you need reliable ONNX output deletion.

Install

sod4onnx on PyPI

pip

pip install sod4onnx

uv

uv add sod4onnx

poetry

poetry add sod4onnx

Installing sod4onnx

Before you install

Installation is straightforward with no runtime dependencies, but the package has been abandoned since its single release on 2022-09-15 with no subsequent updates or maintenance.

License in practice

MIT License permits free use, modification, and distribution with minimal restrictions, making it legally safe to adopt in most projects.

Quickstart

pip install -U sod4onnx

from sod4onnx import outputs_delete
onnx_graph = outputs_delete(
    input_onnx_file_path="model.onnx",
    output_op_names=["cast1_output"],
    output_onnx_file_path="model_modified.onnx"
)

Verify before relying

  • Whether the package works correctly with current ONNX versions or if API changes have broken compatibility.
  • Whether onnx_graphsurgeon (listed in the description's install instructions) is a required runtime dependency despite not appearing in the metadata.

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,429 days since the last release
Last repo commit
First released
Downloads 82,561/month — #14,153 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: sod4onnx-1.0.0-py3-none-any.whl

Tags

onnx model output deletionremove onnx output opsonnx graph surgeryonnx model modificationdelete onnx outputsonnx output pruningonnx model editing
onnx-toolsmodel-optimization

More Artificial Intelligence packages