ssi4onnx
Simple Shape Inference tool for ONNX.
What it is and what it does
ssi4onnx is a shape inference utility for ONNX models that automatically computes and fills in tensor dimension information that may be missing or incomplete. It works by analyzing the model graph structure and operator definitions to deduce output shapes from input specifications. The tool is useful when working with ONNX models that have been simplified, converted from other frameworks, or manually edited—situations where shape metadata may be incomplete or incorrect.
You can use it either as a command-line tool (passing ONNX files in and out) or as a Python library function that accepts an ONNX ModelProto object directly. The library has no external runtime dependencies beyond ONNX itself, making it lightweight to integrate into model processing pipelines. It's part of a broader ONNX processing toolkit maintained by PINTO0309.
Use it for:
- Repair ONNX models with incomplete shape information before deploying to inference engines like TensorRT or ONNX Runtime.
- Debug shape mismatches in converted models (e.g., from PyTorch or TensorFlow) by inferring correct tensor dimensions.
- Preprocess ONNX graphs in a model optimization pipeline to ensure shape metadata is complete before further transformations.
- Validate ONNX model structure by checking whether shape inference succeeds without errors.
- Integrate shape inference into automated model conversion workflows for consistent shape annotation.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Infers and fills missing tensor shape information in ONNX model files, available as both a CLI tool and a Python library function.
Yes, if you work with ONNX models and need to repair or validate shape information. The package is lightweight (no runtime dependencies), permissively licensed, and solves a real problem in ONNX workflows. However, note that the project is dormant (last update 808 days ago), so expect no active maintenance or updates for recent ONNX features.
Install
ssi4onnx on PyPI
pip
pip install ssi4onnxuv
uv add ssi4onnxpoetry
poetry add ssi4onnxInstalling ssi4onnx
Before you install
No runtime dependencies and a pure-Python wheel distribution make installation straightforward. The project is dormant (last update 808 days ago) but carries no known vulnerabilities.
License in practice
MIT License permits unrestricted use, modification, and distribution with minimal restrictions, making it safe to integrate into proprietary or open-source projects.
Quickstart
pip install ssi4onnx
from ssi4onnx import shape_inference
estimated_graph = shape_inference(
input_onnx_file_path="model.onnx"
)
Requires ONNX to be installed separately; the package itself has no runtime dependencies but expects an ONNX model file as input.
Verify before relying
- Whether shape inference handles all ONNX operator types or has known limitations on specific model architectures.
- Performance characteristics on large or complex ONNX graphs.
- Compatibility with recent ONNX opset versions beyond the package's last update.
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 | 82,710/month — #14,141 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: ssi4onnx-1.0.4-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
sit4onnxRuns inference tests on ONNX models using…
permissive · top 15,000 on PyPI
ssc4onnxAnalyzes and displays the structure of ONNX…
permissive · top 15,000 on PyPI
sde4onnxRemoves embedded doc_strings from ONNX model…
permissive · top 15,000 on PyPI
snd4onnxRemoves specified nodes from ONNX model graphs…
permissive · top 15,000 on PyPI
sio4onnxModifies the input and output shapes of ONNX…
permissive · top 15,000 on PyPI
scs4onnxCompresses ONNX model files by deduplicating…
permissive · top 15,000 on PyPI
sbi4onnxModifies ONNX model files to initialize or…
permissive · top 15,000 on PyPI
sne4onnxExtracts subgraphs from ONNX model files by…
permissive · top 15,000 on PyPI
json2onnxConverts JSON files to ONNX model format,…
permissive · top 15,000 on PyPI
onnxslimOnnxSlim reduces the size and operator count of…
permissive · top 5,000 on PyPI