sne4onnx
A very simple tool for situations where optimization with onnx-simplifier would exceed the Protocol Buffers upper file size limit of 2GB, or simply to separate onnx files to any size you want. Simple Network Extraction for ONNX.
Decision gist · record as of 2026-08-14
Yes. The package is lightweight, actively maintained, has no runtime dependencies, carries a permissive MIT license, and solves a real problem in ONNX model workflows—particularly when dealing with large models or size constraints. Install it if you work with ONNX models and need to extract subgraphs or partition files by operation boundaries.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires onnx package to be installed separately (not listed as a dependency in this package).
- Low friction: pure Python wheel with no runtime dependencies.
- Last release was recent (2026-02-24), and the project is actively maintained with a clean repository.
License · maintenance · safety
MIT License (permissive) — MIT License permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and proprietary projects.
last release 2026-02-24 (171 days) · last repo commit 2026-02-24 · 17 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 127,775 downloads/mo, #11,731 on PyPI
Alternatives
Verify before relying
pip install sne4onnx
from sne4onnx import extraction
extracted_graph = extraction(
input_op_names=['aaa','bbb','ccc'],
output_op_names=['ddd','eee','fff'],
input_onnx_file_path='input.onnx',
output_onnx_file_path='output.onnx',
)- Whether onnx is an undeclared runtime dependency or expected to be pre-installed by the user.
- Performance characteristics compared to onnx.utils.extractor.extract_model on large models.
- Whether the custom extraction logic handles all ONNX opset versions correctly.
What it is and what it does
sne4onnx is a lightweight utility for extracting subgraphs from ONNX neural network models. It takes an ONNX file and a pair of input and output operation names, then isolates the computation graph between those points and writes a new, smaller ONNX file. The tool was built to address a specific problem: when onnx-simplifier optimization would push a model past the Protocol Buffers 2GB file size limit, or when you simply want to partition a large model into smaller pieces for deployment or analysis.
The package provides both a command-line interface and a Python API. It implements its own graph extraction logic rather than relying on the slower onnx.utils.extractor.extract_model function. With no runtime dependencies and support for Python versions >=3.6, it integrates easily into existing ONNX workflows. The tool is commonly used in model optimization pipelines, particularly in computer vision and deep learning contexts where model size and inference latency matter.
Use it for
- Extract a specific layer or stage from a large ONNX model to debug or profile that portion independently.
- Split an oversized ONNX model into smaller subgraphs to stay under the 2GB Protocol Buffers limit.
- Isolate a trained backbone or encoder from a full model for transfer learning or fine-tuning.
- Partition a multi-stage inference pipeline (e.g., preprocessing, main model, postprocessing) into separate deployable units.
- Reduce model file size for embedded or edge deployment by keeping only the necessary computation graph.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is lightweight, actively maintained, has no runtime dependencies, carries a permissive MIT license, and solves a real problem in ONNX model workflows—particularly when dealing with large models or size constraints. Install it if you work with ONNX models and need to extract subgraphs or partition files by operation boundaries.
Install
sne4onnx on PyPI
Before you install
Low friction: pure Python wheel with no runtime dependencies. Last release was recent (2026-02-24), and the project is actively maintained with a clean repository.
Requires onnx package to be installed separately (not listed as a dependency in this package).
License in practice
MIT License permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and proprietary projects.
Quickstart
pip install sne4onnx
from sne4onnx import extraction
extracted_graph = extraction(
input_op_names=['aaa','bbb','ccc'],
output_op_names=['ddd','eee','fff'],
input_onnx_file_path='input.onnx',
output_onnx_file_path='output.onnx',
)
Verify before relying
- Whether onnx is an undeclared runtime dependency or expected to be pre-installed by the user.
- Performance characteristics compared to onnx.utils.extractor.extract_model on large models.
- Whether the custom extraction logic handles all ONNX opset versions correctly.
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 | Actively maintained 171 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 127,775 / month, #11,731 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: sne4onnx-2.0.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “onnx model subgraph extraction”
- sne4onnxExtracts subgraphs from ONNX model files by specifying input and…
- sam4onnxRewrites attributes and constants in ONNX model operators via CLI or…
- onnxscriptWrite ONNX functions and models in Python syntax, then convert them…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also scs4onnx · snd4onnx · sng4onnx · spo4onnx · ssc4onnx · soa4onnx · sde4onnx · snc4onnx · sod4onnx · sor4onnx