ONNX Model Comparator for VS Code

Compare two ONNX (Open Neural Network Exchange) models side-by-side within Visual Studio Code and visualize their differences.
You can perceive this as a beyond compare for ONNX models.

Features
- Select Models: Easily select two
.onnx model files from your workspace using file pickers.
- Side-by-Side View: Displays comparison results in a dedicated webview panel.
- Compare Key Components:
- Model Information: Compares metadata like IR version, producer, model version.
- Inputs: Shows differences in input names, data types, and shapes.
- Outputs: Shows differences in output names, data types, and shapes.
- Nodes (Operators): Lists added, removed, or modified nodes, detailing changes in inputs, outputs, attributes, and parameter shapes.
- Initializers: Compares weights and constants, highlighting differences in data type and shape.
- Highlight Differences: Uses color-coding (green for added, red for removed, orange for modified) to easily spot changes.
- Node Search: Filter the nodes table by name to quickly find specific operators.
Usage
- Open the VS Code Command Palette (
Cmd+Shift+P on macOS, Ctrl+Shift+P on Windows/Linux).
- Run the command:
Compare ONNX Models .
- You will be prompted to select the first ONNX model file.
- You will then be prompted to select the second ONNX model file.
- A new panel will open displaying the comparison results.
Requirements
- Visual Studio Code version 1.85.0 or higher.
- Node.js (for running the extension host).
Known Issues
- Comparison of large initializers (weights) currently only checks for existence, data type, and shape differences, not value differences.
- Display of very complex tensor shapes or attributes might be simplified.
License
This extension is licensed under the MIT License.
| |