skillfed

snd4onnx

Simple node deletion tool for onnx.

snd4onnx v1.1.7 83.4K downloads/30d#14,076 on PyPI7
Permissive license MIT License AGING released

What it is and what it does

snd4onnx is a lightweight utility for removing named nodes from ONNX model graphs. It works both as a command-line tool and as a Python library, accepting a list of node names to delete and either an input file path or an in-memory graph object, then outputting the modified model. The package has no runtime dependencies beyond Python itself.

The tool is designed for model optimization and experimentation workflows where you need to strip out specific operations from a trained neural network—for instance, removing debug layers, unused branches, or operations incompatible with a target inference engine. The author notes it is a hobby project with limited test coverage and likely bugs, so it is best suited for exploratory work rather than production pipelines.

Use it for:

  • Remove debug or instrumentation nodes from a trained ONNX model before deployment.
  • Strip out unsupported operations to make a model compatible with a specific inference runtime.
  • Simplify a model graph by deleting unused branches or redundant layers during optimization.
  • Experiment with model architecture by removing operations to test inference behavior.
  • Preprocess models downloaded from model zoos before fine-tuning or conversion.

Worth the install?

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

Removes specified nodes from ONNX model graphs via CLI or Python API, outputting a modified model file or in-memory graph.

Yes, if you need to surgically remove nodes from ONNX graphs and accept the trade-off of limited test coverage. Install friction is minimal and the MIT license is unrestrictive. The aging maintenance status and author's caveat about bugs mean it is best for ad-hoc model editing rather than critical production pipelines; for complex graph surgery, verify behavior on your specific models first.

Install

snd4onnx on PyPI

pip

pip install snd4onnx

uv

uv add snd4onnx

poetry

poetry add snd4onnx

Installing snd4onnx

Before you install

Low friction install with no runtime dependencies. Last commit was 2025-10-04 and the package is marked aging, indicating infrequent updates but not abandoned.

License in practice

MIT License permits use, modification, and distribution with minimal restrictions, making it safe for both open and closed projects.

Quickstart

pip install snd4onnx

from snd4onnx import remove

onnx_graph = remove(
    remove_node_names=['node_name_a', 'node_name_b'],
    input_onnx_file_path='input.onnx'
)

Requires an existing ONNX model file or in-memory onnx.ModelProto object; node names must be known in advance.

Verify before relying

  • Whether the tool correctly handles edge cases like nodes with multiple downstream consumers or complex graph topologies beyond the sample patterns shown.
  • Performance characteristics when removing nodes from large models.
  • Compatibility with all ONNX opset versions and operator types.

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 83,427/month — #14,076 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: snd4onnx-1.1.7-py3-none-any.whl

Tags

onnx node removaldelete nodes from onnxonnx graph editingonnx model simplificationremove operations from neural networkonnx node pruningonnx graph surgery
onnx-toolsmodel-optimization

More Artificial Intelligence packages