sor4onnx
Simple OP Renamer for ONNX.
What it is and what it does
sor4onnx is a lightweight utility for renaming nodes in ONNX model files. It provides both a command-line interface and a Python API to perform string-based replacements on input names, output names, and operator names within an ONNX graph. The tool supports four matching strategies—exact, partial, prefix, and suffix—and can target all nodes or restrict changes to inputs or outputs only.
The package is designed for model preprocessing workflows where node names need to be standardized, cleaned up, or adapted for downstream tools. It reads an ONNX file or graph object, applies the specified string transformations, and outputs the modified model. With no external runtime dependencies, it installs quickly and integrates easily into Python scripts or shell pipelines.
Use it for:
- Strip namespace prefixes (e.g., 'onnx::') from operator names before deployment to inference engines.
- Rename model inputs and outputs to match expected interface names in production systems.
- Batch-rename nodes matching a pattern (prefix or suffix) to standardize naming conventions across a model zoo.
- Prepare ONNX models exported from different frameworks by normalizing node nomenclature.
- Integrate model transformation into CI/CD pipelines via CLI for automated preprocessing.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Renames input, output, and operator nodes in ONNX model files using string matching (exact, partial, prefix, or suffix) via CLI or Python API.
Yes, if you need to rename ONNX nodes. The package is lightweight, has no dependencies, and carries permissive licensing. However, maintenance is dormant (last update 808 days ago), so verify compatibility with your ONNX version before relying on it in production. For one-off renaming tasks or model preprocessing, it is a practical choice.
Install
sor4onnx on PyPI
pip
pip install sor4onnxuv
uv add sor4onnxpoetry
poetry add sor4onnxInstalling sor4onnx
Before you install
Low friction; pure Python wheel with no runtime dependencies. Maintenance is dormant—last release 808 days ago—but the package is stable and archived status is false, suggesting it remains available.
License in practice
MIT License permits commercial and private use with minimal restrictions, making it safe to integrate into most projects.
Quickstart
pip install sor4onnx
from sor4onnx import rename
onnx_graph = rename(
old_new=["onnx::", ""],
input_onnx_file_path="model.onnx",
output_onnx_file_path="model_renamed.onnx",
search_mode="prefix_match"
)
Verify before relying
- Whether the package works correctly with current ONNX versions (last tested or verified version not stated in fact sheet).
- Performance characteristics when renaming large graphs or handling many simultaneous replacements.
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 | dormant — 808 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 83,107/month — #14,100 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: sor4onnx-1.0.7-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
svs4onnxSwaps connections between output and input…
permissive · top 15,000 on PyPI
simple-onnx-processing-toolsA collection of command-line tools for…
permissive · top 15,000 on PyPI
soa4onnxAdds or modifies output nodes in ONNX model…
permissive · top 15,000 on PyPI
sod4onnxsod4onnx removes specified output operations…
permissive · top 15,000 on PyPI
snd4onnxRemoves specified nodes from ONNX model graphs…
permissive · top 15,000 on PyPI
sam4onnxRewrites attributes and constants in ONNX model…
permissive · top 15,000 on PyPI
sna4onnxAdds new operations (nodes) to ONNX model…
permissive · top 15,000 on PyPI
sbi4onnxModifies ONNX model files to initialize or…
permissive · top 15,000 on PyPI
snc4onnxMerges multiple ONNX neural network models into…
permissive · top 15,000 on PyPI