DigestAI is a powerful model analysis tool that extracts insights from your models, enabling optimization and direct modification.
- Single Model Analysis:
- Analyze individual models to extract parameters, FLOPs, protobuf metadata, histograms, model similarity, and IO tensors.
- Freeze dynamic input shapes to ensure consistent calculations and analysis.
- Multi-Model Analysis:
- Compare high-level statistics of multiple models side by side.
- Batch process single model reports for efficient analysis.
- Reporting and Export:
- Save all extracted statistics into comprehensive reports and CSV files for easy sharing and collaboration.
- Open and view shared reports directly within the GUI for seamless integration.
For more insights on Digest AI, see our announcement blog here.
-
Windows downloads: Check GitHub Releases for
digestai-windows-x64.zip. Extract it and rundigest.exe. Until a release provides this asset, use the source installation below. -
Developers: Contribute to DigestAI Follow the installation instruction below to get started.
-
Install pixi.
-
Clone the repository:
git clone https://github.com/onnx/digestai.git cd digestai -
Start the GUI. On first run, pixi creates the environment from
pixi.lockand installs Digest AI in editable mode:pixi run digest
Use
pixi shellto open a terminal with the environment activated, orpixi task listto see all available tasks.
Alternatively, install Digest AI with pip into any Python 3.11–3.13 environment: pip install -e .
PyPI publishing access is being established in issue #30. Use the source installation above until a PyPI release is announced.
The locked Pixi environments support Windows x86-64, Linux x86-64, and Apple silicon Macs running macOS 14 or newer. DigestAI supports Python 3.11, 3.12, and 3.13.
- FLOP totals require static input shapes. Models with dynamic dimensions must be frozen before a complete total can be calculated.
- Operators without a known FLOP formula are reported without a FLOP count. Models containing unsupported recurrent or custom operators may not have a model-level total.
- ONNX models that use external tensor data must keep those data files beside the model. Some metadata-only operations intentionally avoid loading external data to reduce memory use.
In Digest, you can open a model in 3 ways:
- In the left sidebar, you can open a model by clicking on the “Open a local model” button.
- You can use the keyboard shortcut CTRL+O, which will open a file explorer where you can select the model you would like to open.
- Or you can simply drag and drop a model file directly onto the interface.
DigestAI also allows you to load a Digest report from a shared YAML file, enabling you to view the report directly in the GUI.
When you select a model file, Digest AI checks model integrity, prepares it for analysis, and extracts key data. After the analysis is complete, you will see a detailed summary of your model, including:
- Basic Details: Parameters and FLOPs (Floating Point Operations), which is the algorithmic number of floating-point operations required to run a single set of inputs through the model.
- Advanced Insights: Operation histogram, parameter and FLOPs intensity per operation type, and a model similarity graph comparing your model to other popular models.
- Model Inputs and Outputs: Detailed information about tensor names, shapes, data types, and sizes.
There is also a Node List button that opens a window displaying all nodes in the model in a table format, which you can then sort on the various columns.
Digest AI allows you to save the model analysis using the “Save Report” button found in the left menu.
When you click the save button, specify a folder to save the reports. The following is an example of the files saved:
- Heatmap: a PNG image that shows the similarity of the model to other public models.
- Node CSV Report: contains all the model’s nodes, parameters, FLOPs, attributes, and inputs and outputs.
- Report: a text document summarizing the model analysis.
- Histogram: a PNG image of the operation count.
- Node Type Counts CSV Report: contains all the model’s nodes and their counts.
Digest AI also includes support for multi-model analysis. By clicking the “Multi-Model Analysis” button, you can select a folder containing multiple models.
This will load a new view where the left pane will list unique models, while the right pane will indicate duplicates.
Folder scanning runs in the background. Use Cancel to stop scanning; the current file may need to finish loading before cancellation completes. Unreadable files are skipped with a warning, and scanning stops if system memory usage reaches 90%.
Digest AI also includes a Hugging Face module that enables users to download ONNX models directly from the Hugging Face hub without leaving Digest AI. You can search for a model, select it, and click Open. Digest AI will download the model, analyze it, and take you to the summary page.
This feature is currently in Beta and enabled by default. Source installations can
disable it by setting modules.huggingface to false in src/digest/gui_config.yaml.
Some models may have dynamic input shapes, which can affect certain calculations like FLOPs. If you encounter this, Digest AI will display a warning message. To freeze a model with dynamic shapes, scroll down to the “Input Tensor” information section and click the blue snowflake icon next to the table.
This will open a utility where you can specify static dimensions for the inputs, and you can then save the modified model with static shapes.
Enter positive integers for dynamic dimensions. If shape validation or saving fails, the window shows the error and allows you to correct the inputs and retry. Canceling does not save or open a partially modified model.
Digest AI includes an API for ingesting, modifying, and analyzing machine learning models. This includes the ability to perform the following:
- Analyzes a single model or multiple models in a directory.
- Generates reports on model summary, node lists, node type counts, and node shape counts.
The analysis.py script can be found in the examples/ directory.
# Single model
python analysis.py /path/to/model.onnx /path/to/output/directory
# Multiple models
python analysis.py /path/to/model/directory /path/to/output/directoryFor more information on Digest API, see the Digest API Guide.
Qt Designer offers a visual (WYSIWYG) approach to creating user interfaces. This project leverages Qt Designer to build and maintain the UI files located in src/digest/ui.
Key File Types:
*.ui: Qt Designer files – open these directly in Qt Designer to visually edit your interface.*.py: Python UI files – generated automatically (compiled) from the.uifiles. These are used by your application code.
The following steps are recommended because they are reproducible, however, there are several ways to configure and run your workflow, so feel free to follow your own script. Ensure you followed the Installation Instructions for Developers above.
Workflow
-
Open Qt Designer:
- Launch: Run
pixi run designerfrom the project's root directory.
- Launch: Run
-
Work with UI Files:
- Open any existing UI file (
.ui) fromsrc/digest/ui. - Design your interface using the drag-and-drop tools and property editor.
- Resource Files (Optional): If your UI uses custom icons, images, or stylesheets, please leverage the Qt resource file (
.qrc). This makes it easier to manage and package resources with the application. - The generated Python files in
src/digest/uiare excluded from linting (see[tool.ruff]inpyproject.toml).
- Open any existing UI file (
-
Recompile UI Files (After Making Changes):
- From the project's root directory, run:
pixi run compile-ui
- From the project's root directory, run:
-
Set up the environment by following the Installation Instructions for Developers. PyInstaller is included in the default pixi environment.
-
Run the following command to create the executable:
pixi run build-exe
-
digest.exewill be built todist/digest.exe.
For GUI troubleshooting, open the information dialog to find the diagnostic log
location. GUI launches record Python stdout/stderr and unhandled exceptions in
digest.log, with up to three rotated backups of 2 MiB each. Native-library output
written directly to operating-system file descriptors is not captured. Review logs
before sharing them: they may include local model paths and error details.
We welcome contributions! If you'd like to get involved, please:
-
Choose an Issue or Create One: Take a look at our existing issues to find something you'd like to work on. If you have a new idea, please create a new issue to discuss it with the maintainers.
-
Fork or Branch and Create a Pull Request (PR): Fork the repository, make your changes, and submit a PR. Ensure your PR has a clear description of the changes and refers to any issues it addresses (if applicable).
-
Lint and Test: CI lints with ruff and runs the report tests. Run the same checks locally from the digestai root directory with:
pixi run lint
pixi run test- Run GUI Tests Locally: CI runs the GUI tests offscreen and tests a wheel installed in a clean environment. Run the GUI tests from the digestai root directory using:
pixi run test-guiSet QT_QPA_PLATFORM=offscreen when running without a display. To reproduce the
installed-wheel check, run python -m build followed by
python tools/check_wheel.py dist with a Python installation that supports venv.
Release maintainers: see Releasing DigestAI and the changelog.
To get in touch, please reach out to us at digestai@amd.com.
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.
The project follows the REUSE specification: each file carries SPDX copyright and license information, either in a header or in REUSE.toml. New source files should start with the same SPDX license header as the existing ones. Check with pipx run reuse lint.
The ONNX code of conduct is described at ONNX Code of Conduct.
Copyright(C) 2024 Advanced Micro Devices, Inc. All rights reserved.

