skillfed

soa4onnx

Simple model output OP additional tools.

soa4onnx v1.0.5 84.1K downloads/30d#14,029 on PyPI4
Permissive license MIT License AGING released

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 soa4onnx

uv

uv add soa4onnx

poetry

poetry add soa4onnx

Installing 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

onnx model output modificationexpose intermediate onnx layersonnx graph output editingadd outputs to onnx modelonnx node extraction toolintermediate layer extraction onnx
onnx-toolsmodel-debugging

More Artificial Intelligence packages