sod4onnx
Simple model output OP additional tools.
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 sod4onnxuv
uv add sod4onnxpoetry
poetry add sod4onnxInstalling 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
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
soa4onnxAdds or modifies output nodes in ONNX model…
permissive · top 15,000 on PyPI
svs4onnxSwaps connections between output and input…
permissive · top 15,000 on PyPI
sng4onnxAutomatically generates and assigns operation…
permissive · top 15,000 on PyPI
snd4onnxRemoves specified nodes from ONNX model graphs…
permissive · top 15,000 on PyPI
sde4onnxRemoves embedded doc_strings from ONNX model…
permissive · top 15,000 on PyPI
soc4onnxChanges the opset version of an ONNX model…
permissive · top 15,000 on PyPI
sio4onnxModifies the input and output shapes of ONNX…
permissive · top 15,000 on PyPI
sor4onnxRenames input, output, and operator nodes in…
permissive · top 15,000 on PyPI
simple-onnx-processing-toolsA collection of command-line tools for…
permissive · top 15,000 on PyPI
snc4onnxMerges multiple ONNX neural network models into…
permissive · top 15,000 on PyPI