skillfed

sed4onnx

Simple ONNX constant encoder/decoder.

sed4onnx v1.0.5 82.7K downloads/30d#14,145 on PyPI6
Permissive license MIT License Abandoned released

What it is and what it does

sed4onnx is a utility for converting constant values in ONNX model files between ASCII and Base64 formats. It sits in a workflow where you export an ONNX model to JSON (with constants Base64-encoded), edit the constant values using sed4onnx to convert them back and forth between human-readable and encoded forms, and then regenerate the modified ONNX file. The package provides both a command-line interface and a Python API with encode() and decode() functions that handle float16, float32, float64, uint8, int8, int16, int32, int64, and string data types.

The package has no external runtime dependencies and installs as a pure Python wheel, making it lightweight and portable. However, it has been abandoned since late 2022 with no maintenance activity since then, so it will not receive updates, bug fixes, or compatibility patches for newer ONNX or Python versions.

Use it for:

  • Modify constant tensor values in ONNX models by exporting to JSON, editing constants, and regenerating the model.
  • Convert between Base64 and ASCII representations of numeric arrays when working with ONNX constant serialization.
  • Batch-encode or decode constant values in a Python script as part of an ONNX model transformation pipeline.
  • Inspect and edit ONNX model constants that have been exported to JSON.
  • Support workflows that require programmatic modification of ONNX model constants without full model retraining.

Worth the install?

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

Encodes and decodes Base64-formatted constant values for ONNX model files, supporting multiple numeric and string data types via CLI or Python API.

Yes, if you are actively working with ONNX model constant modification and can tolerate the lack of maintenance. The package is lightweight, has no dependencies, and does one job well. However, if you need ongoing support, compatibility updates, or are starting a new ONNX workflow, consider whether an actively maintained alternative exists or whether the dormant status poses a risk to your project timeline.

Install

sed4onnx on PyPI

pip

pip install sed4onnx

uv

uv add sed4onnx

poetry

poetry add sed4onnx

Installing sed4onnx

Before you install

Low friction: pure Python wheel with no runtime dependencies. Maintenance is dormant (last release 2022-12-30, no activity since), so expect no updates or bug fixes going forward.

License in practice

MIT License permits free use, modification, and distribution with minimal restrictions—suitable for both open and closed projects.

Quickstart

pip install -U sed4onnx

from sed4onnx import encode, decode

base64_string = encode(
  constant_string='[-1,3,224,224]',
  dtype='int64',
)

numpy_ndarray = decode(
  constant_string='//////////8DAAAAAAAAAOAAAAAAAAAA4AAAAAAAAAA=',
  dtype='int64',
)

Requires Python >=3.6

Verify before relying

  • Whether the package works correctly with current ONNX versions and modern Python releases despite no recent maintenance.
  • Compatibility with onnx2json and json2onnx tools mentioned in the description—whether those remain functional.
  • Performance characteristics when handling large constant values or many encode/decode operations.

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

Evidence: sed4onnx-1.0.5-py3-none-any.whl

Tags

ONNX constant encoder decoderBase64 ONNX conversionONNX model constant editingencode decode ONNX valuesONNX JSON constant conversionBase64 ASCII ONNXONNX model constant modification
onnx-toolsmodel-editing

More Artificial Intelligence packages