Metadata-Version: 2.4
Name: ssp4onnx
Version: 1.0.4
Summary: Simple Split for ONNX. A simple tool that automatically splits ONNX models of specified weight sizes.
Keywords: onnx,deep-learning,machine-learning
Author: Katsuya Hyodo
Author-email: Katsuya Hyodo <rmsdh122@yahoo.co.jp>
License-Expression: MIT
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: Unix
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Dist: numpy==1.26.4
Requires-Dist: onnx==1.19.1
Requires-Dist: onnx-graphsurgeon==0.5.8
Requires-Python: >=3.10.12
Project-URL: Homepage, https://github.com/PINTO0309/ssp4onnx
Project-URL: Repository, https://github.com/PINTO0309/ssp4onnx
Project-URL: Documentation, https://github.com/PINTO0309/ssp4onnx#readme
Description-Content-Type: text/markdown

# ssp4onnx
**S**imple **Sp**lit for ONNX. A simple tool that automatically splits ONNX models of specified weight sizes.

[![Downloads](https://static.pepy.tech/personalized-badge/ssp4onnx?period=total&units=none&left_color=grey&right_color=brightgreen&left_text=Downloads)](https://pepy.tech/project/ssp4onnx) ![GitHub](https://img.shields.io/github/license/PINTO0309/ssp4onnx?color=2BAF2B) [![PyPI](https://img.shields.io/pypi/v/ssp4onnx?color=2BAF2B)](https://pypi.org/project/ssp4onnx/)  [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/PINTO0309/ssp4onnx)

## Usage
```bash
pip install ssp4onnx

ssp4onnx -i model.onnx --auto_split_max_size 1GB
```
<img width="646" height="155" alt="image" src="https://github.com/user-attachments/assets/cdc7e1c4-4a34-44fd-ac16-92a96d38434f" />

<img width="539" height="330" alt="image" src="https://github.com/user-attachments/assets/6779d186-3f4c-4f5c-b860-49ffc2843967" />

Options:
- `-i/--input_onnx_file`: input ONNX file (required)
- `-o/--output_dir`: output directory (optional, default: same directory as input)
- `-s/--auto_split_max_size`: target partition size, supports `KB`, `MB`, `GB` (default: `100MB`)

## Sample reuslts

  |Split.1 (1.1GB)|Split.2 (1.1GB)|Split.3 (0.4GB)|
  |:-:|:-:|:-:|
  |<img width="615" height="656" alt="20260131213930" src="https://github.com/user-attachments/assets/6e622d15-e1d6-422f-aee5-d8a21c1c10fc" />|<img width="651" height="669" alt="20260131213947" src="https://github.com/user-attachments/assets/1a300e8e-3bd2-4994-b1e6-713837b2ea51" />|<img width="640" height="641" alt="20260131214003" src="https://github.com/user-attachments/assets/d12add6b-a390-41ec-91bc-69a928910521" />|

