sna4onnx
Simple node addition tool for onnx. Simple Node Addition for ONNX.
What it is and what it does
sna4onnx is a command-line and Python library tool for inserting new ONNX operators into existing model graphs. It lets you specify source and destination connection points, then injects a new operation between them while preserving model structure. The tool works by taking an input ONNX file, defining the new operator type and its input/output variables and attributes, and wiring it into the graph at the specified nodes.
The package is designed to work alongside other ONNX manipulation tools like sog4onnx (which generates operators) and snc4onnx (which merges model parts). It performs full model consistency checks after insertion and outputs the modified model even if warnings are raised. Only one operator can be added per invocation, and unconnected input/output variables are automatically added to the graph's input/output definitions.
Use it for:
- Insert preprocessing or postprocessing operations into an existing ONNX model pipeline.
- Add custom operators between model layers for debugging or feature extraction.
- Inject normalization, scaling, or transformation nodes into a frozen model graph.
- Combine operator generation (via sog4onnx) with graph insertion for model modification workflows.
- Modify model architecture by adding intermediate operations without retraining.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Adds new operations (nodes) to ONNX model graphs at specified connection points, allowing insertion of custom operators between existing model layers.
No—the project is abandoned (last update 2022-09-09). While the tool itself is permissively licensed and has low install friction, the lack of maintenance means no bug fixes, no compatibility updates for modern ONNX or Python versions, and no support for new operator types. Use only if you have a specific, stable use case with an older ONNX version and are willing to maintain a fork yourself.
Install
sna4onnx on PyPI
pip
pip install sna4onnxuv
uv add sna4onnxpoetry
poetry add sna4onnxInstalling sna4onnx
Before you install
Low friction install with a single runtime dependency (sog4onnx). However, the project is abandoned—last commit was 2022-09-09 with no updates since. No active maintenance or bug fixes should be expected.
License in practice
MIT License permits commercial and private use with minimal restrictions, making it safe from a licensing perspective for most projects.
Quickstart
pip install sna4onnx
from sna4onnx import add
model = add(
connection_src_op_output_names=[["OpA", "out1", "NewOp", "in1"]],
connection_dest_op_input_names=[["NewOp", "out1", "OpB", "in1"]],
add_op_type="Add",
add_op_name="NewOp",
input_onnx_file_path="model.onnx"
)
Requires Python >=3.6; sog4onnx must also be installed as a runtime dependency.
Verify before relying
- Whether sog4onnx (the single runtime dependency) is actively maintained or also abandoned.
- Compatibility with recent ONNX versions and modern Python releases beyond 3.6.
- Whether the abandoned status affects real-world usability for stable ONNX model editing tasks.
Package facts
| License | MIT License (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — sog4onnx |
| Maintenance | abandoned — 1,435 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 82,700/month — #14,142 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: sna4onnx-1.0.6-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
sng4onnxAutomatically generates and assigns operation…
permissive · top 15,000 on PyPI
soa4onnxAdds or modifies output nodes in ONNX model…
permissive · top 15,000 on PyPI
sog4onnxGenerates minimal ONNX operation graphs by…
permissive · top 15,000 on PyPI
sam4onnxRewrites attributes and constants in ONNX model…
permissive · top 15,000 on PyPI
sor4onnxRenames input, output, and operator nodes in…
permissive · top 15,000 on PyPI
snd4onnxRemoves specified nodes from ONNX model graphs…
permissive · top 15,000 on PyPI
sod4onnxsod4onnx removes specified output operations…
permissive · top 15,000 on PyPI
soc4onnxChanges the opset version of an ONNX model…
permissive · top 15,000 on PyPI
snc4onnxMerges multiple ONNX neural network models into…
permissive · top 15,000 on PyPI
svs4onnxSwaps connections between output and input…
permissive · top 15,000 on PyPI