--- id: sde4onnx version: "1.0.0" license: MIT License license_treatment: permissive maintenance: abandoned --- # sde4onnx — Simple doc_string eraser for ONNX. License: permissive · Maintenance: abandoned · Downloads: 82.6K/mo ## What it is and what it does sde4onnx is a lightweight utility that strips embedded documentation strings from ONNX model files. ONNX models—particularly those from Hugging Face or other model hubs—often carry verbose metadata and doc_strings that inflate file size without affecting inference. This tool reads an ONNX file, removes those doc_strings, and writes a cleaned version back to disk or returns the modified graph object for further processing. The package offers both a command-line interface and a Python API. It has no runtime dependencies beyond ONNX itself (which you must install separately) and runs as pure Python. It is designed for a single, narrow task: if you need to reduce ONNX model size by stripping documentation, this tool does that. However, the project is no longer maintained—the last release and commit were in October 2022—so it may not adapt to future ONNX format changes. Use it for: - Reduce download and storage size of Stable Diffusion or other large ONNX models before deployment. - Strip metadata from ONNX graphs in a preprocessing pipeline before quantization or optimization. - Clean up ONNX files exported from frameworks like PyTorch or TensorFlow before shipping to edge devices. - Automate doc_string removal in batch processing of model repositories. - Integrate into CI/CD workflows to standardize ONNX artifacts by removing non-essential metadata. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Removes embedded doc_strings from ONNX model files, reducing file size and metadata bloat in serialized neural network graphs. Yes, if you have a specific need to reduce ONNX file size by removing doc_strings and are willing to accept that the package is no longer maintained. The tool is simple, has no dependencies, and the task it performs is unlikely to break. No, if you expect ongoing support, compatibility updates, or if you need more comprehensive ONNX optimization—consider ONNX Runtime tools or TensorRT ONNX GraphSurgeon instead. ## Install pip install sde4onnx uv add sde4onnx poetry add sde4onnx ## Installing sde4onnx Before you install: Low friction: pure Python wheel with no runtime dependencies. However, the package is abandoned—last release was 2022-10-15 and no commits since then. Use only if the single task of doc_string erasure is stable enough for your workflow. License in practice: MIT License permits commercial and private use with minimal restrictions. No licensing barrier to adoption. Quickstart: pip install sde4onnx from sde4onnx import erase onnx_graph = erase( input_onnx_file_path="model.onnx", output_onnx_file_path="model_erased.onnx" ) Requires Python >=3.6. ONNX library must be installed separately (not declared as a dependency in sde4onnx itself). Verify before relying: - Whether the package correctly handles all ONNX model variants and versions beyond the Stable Diffusion use case shown in docs. - Whether abandonment since 2022-10-15 means compatibility issues with current ONNX spec or Python versions. - Performance impact of doc_string erasure on model loading or inference speed. ## Package facts - License: MIT License (permissive) - Python support: supports_current - Install friction: low - Maintenance: abandoned - Downloads: 82.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags onnx model doc string removal, strip metadata from onnx files, onnx file size reduction, onnx graph cleaning, remove onnx documentation, onnx model optimization, onnx serialization cleanup, onnx-tools, model-optimization [View on SkillFed](https://skillfed.io/packages/sde4onnx) · [View on PyPI](https://pypi.org/project/sde4onnx/)