soa4onnx
Simple model output OP additional tools.
What it is and what it does
soa4onnx is a lightweight utility for modifying ONNX model graphs by designating intermediate operations as model outputs. It works by taking an existing ONNX file and a list of operation names, then rewiring the graph so those operations become exposed outputs that can be queried independently. This is useful when you want to extract intermediate layer activations or debug specific computation stages without retraining or restructuring the model.
The package offers both a command-line interface and a Python API (outputs_add function). It requires only Python 3.6+ and has no external runtime dependencies, making it straightforward to integrate into model processing pipelines. The tool includes optional type checking and verbosity control for integration into automated workflows.
Use it for:
- Extract intermediate layer outputs from a trained model for visualization or analysis without model retraining
- Debug ONNX graphs by exposing internal node outputs to inspect computation at specific stages
- Prepare models for multi-output inference where only certain intermediate results are needed
- Adapt pre-trained models to new downstream tasks by exposing different layer outputs as model endpoints
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Adds or modifies output nodes in ONNX model graphs, allowing you to expose intermediate layer outputs as model endpoints via CLI or Python API.
Yes, if you work with ONNX models and need to expose intermediate outputs. The package is lightweight, has no dependencies, and carries permissive licensing. However, maintenance is aging (last release 314 days ago), so verify compatibility with your ONNX runtime version before relying on it in production pipelines.
Install
soa4onnx on PyPI
pip
pip install soa4onnxuv
uv add soa4onnxpoetry
poetry add soa4onnxInstalling soa4onnx
Before you install
Low friction; pure Python wheel with no runtime dependencies. Maintenance is aging—last release was 314 days ago—but the repository is active and not archived.
License in practice
MIT License permits commercial and private use with minimal restrictions; you must retain the license notice in distributions.
Quickstart
pip install soa4onnx
from soa4onnx import outputs_add
onnx_graph = outputs_add(
input_onnx_file_path="model.onnx",
output_op_names=["onnx::Gather_76", "onnx::Add_89"],
output_onnx_file_path="model_added.onnx"
)
Verify before relying
- Whether the package handles complex ONNX opset versions or only specific versions
- Performance characteristics when working with very large models or many output nodes
- Compatibility with recent ONNX runtime versions beyond what the fact sheet indicates
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 | aging — 314 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 84,058/month — #14,029 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: soa4onnx-1.0.5-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
soc4onnxChanges the opset version of an ONNX model…
permissive · top 15,000 on PyPI
sod4onnxsod4onnx removes specified output operations…
permissive · top 15,000 on PyPI
sna4onnxAdds new operations (nodes) to ONNX model…
permissive · top 15,000 on PyPI
svs4onnxSwaps connections between output and input…
permissive · top 15,000 on PyPI
sio4onnxModifies the input and output shapes of ONNX…
permissive · top 15,000 on PyPI
snd4onnxRemoves specified nodes from ONNX model graphs…
permissive · top 15,000 on PyPI
sor4onnxRenames input, output, and operator nodes in…
permissive · top 15,000 on PyPI
sam4onnxRewrites attributes and constants in ONNX model…
permissive · top 15,000 on PyPI
sne4onnxExtracts subgraphs from ONNX model files by…
permissive · top 15,000 on PyPI
onnx-graphsurgeonONNX GraphSurgeon lets you programmatically…
permissive · top 15,000 on PyPI