skillfed

svs4onnx

Simple model output OP additional tools.

svs4onnx v1.0.0 82.5K downloads/30d#14,157 on PyPI1
Permissive license MIT License Abandoned released

What it is and what it does

svs4onnx is a lightweight utility for modifying ONNX model graphs by redirecting variable connections. It takes an ONNX model, identifies an output variable from one node, and rewires it to feed into a specified input variable of another node, then outputs the modified graph. This is useful when you need to restructure model topology—for example, bypassing intermediate operations or connecting different stages of a pipeline.

The tool offers both a command-line interface and a Python API. You can load an ONNX file or pass a graph object directly, specify the source output variable and target input variable, and get back a modified ModelProto. It supports Python 3.6 and later.

Use it for:

  • Redirect a model's intermediate output to skip or replace downstream operations during inference.
  • Rewire multi-stage pipelines to connect outputs from one model directly to inputs of another.
  • Modify model topology for debugging or testing by changing which nodes feed into which.
  • Adapt pre-trained models to new input/output configurations by swapping variable connections.

Worth the install?

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

Swaps connections between output and input variables in ONNX model graphs, allowing you to redirect one node's output to feed into a different node's input.

No, unless you have a specific legacy use case. The package is abandoned—last release 2022-09-17 with no commits since then—and has not been tested against current ONNX versions. If you need ONNX graph manipulation, consider maintained alternatives.

Install

svs4onnx on PyPI

pip

pip install svs4onnx

uv

uv add svs4onnx

poetry

poetry add svs4onnx

Installing svs4onnx

Before you install

Low install friction; pure Python wheel with no runtime dependencies. However, the package is abandoned—last release was 2022-09-17 and no commits since then.

License in practice

MIT License permits commercial and private use, modification, and distribution with minimal restrictions.

Quickstart

pip install svs4onnx
from svs4onnx import variable_switch
onnx_graph = variable_switch(
    from_output_variable_name="cast1_output",
    to_input_variable_name="StatefulPartitionedCall/strided_slice_21",
    input_onnx_file_path="model.onnx",
    output_onnx_file_path="model_switched.onnx"
)

Requires onnx to be installed separately; not declared as a runtime dependency in the package metadata.

Verify before relying

  • Whether onnx is a required peer dependency or optional; setup docs show it installed separately but package lists zero runtime dependencies.
  • Compatibility with recent ONNX versions and whether the tool works with current model architectures.

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 abandoned — 1,427 days since the last release
Last repo commit
First released
Downloads 82,533/month — #14,157 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: svs4onnx-1.0.0-py3-none-any.whl

Tags

onnx graph variable rewiringonnx node connection modificationonnx output to input redirectonnx model graph surgeryonnx variable connection swap
onnx-toolsmodel-surgery

More Artificial Intelligence packages