{"id":27631365,"url":"https://github.com/justinchuby/model-explorer-onnx","last_synced_at":"2026-01-12T11:49:43.854Z","repository":{"id":240271209,"uuid":"802125476","full_name":"justinchuby/model-explorer-onnx","owner":"justinchuby","description":"Visualize ONNX models with model-explorer","archived":false,"fork":false,"pushed_at":"2025-03-07T00:35:51.000Z","size":368,"stargazers_count":30,"open_issues_count":5,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T04:54:38.441Z","etag":null,"topics":["deep-learning","onnx","visualization"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/model-explorer-onnx/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/justinchuby.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-17T15:11:46.000Z","updated_at":"2025-04-07T16:59:05.000Z","dependencies_parsed_at":"2024-05-20T20:35:46.304Z","dependency_job_id":"bcadda72-2bf8-4877-a790-7a7b5a5e215f","html_url":"https://github.com/justinchuby/model-explorer-onnx","commit_stats":null,"previous_names":["justinchuby/model-explorer-onnx"],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinchuby%2Fmodel-explorer-onnx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinchuby%2Fmodel-explorer-onnx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinchuby%2Fmodel-explorer-onnx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinchuby%2Fmodel-explorer-onnx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justinchuby","download_url":"https://codeload.github.com/justinchuby/model-explorer-onnx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250485052,"owners_count":21438354,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-learning","onnx","visualization"],"created_at":"2025-04-23T17:47:12.385Z","updated_at":"2026-01-12T11:49:43.849Z","avatar_url":"https://github.com/justinchuby.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Model Explorer ONNX Adapter\n\n[![PyPI - Version](https://img.shields.io/pypi/v/model-explorer-onnx.svg)](https://pypi.org/project/model-explorer-onnx) [![PyPI - Downloads](https://img.shields.io/pypi/dm/model-explorer-onnx)](https://pypi.org/project/model-explorer-onnx) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n\nONNX Adapter for [google-ai-edge/model-explorer](https://github.com/google-ai-edge/model-explorer)\n\n## 🌟 Use it on HuggingFace Spaces\n\nhttps://huggingface.co/spaces/justinchuby/model-explorer\n\n## Installation\n\n```bash\npip install --upgrade model-explorer-onnx\n```\n\n## Usage\n\n```bash\nmodel-explorer --extensions=model_explorer_onnx\n\n# Or as a shortcut\nonnxvis\n\n# Supply model path\nonnxvis model.onnx\n```\n\n\u003e [!NOTE]\n\u003e Model Explorer only supports WSL on Windows.\n\nRead more on the [Model Explorer User Guide](https://github.com/google-ai-edge/model-explorer/wiki/2.-User-Guide).\n\n## Notes on representation\n\nGraph input/output/initializers in ONNX are values (edges), not nodes. A node is displayed here for visualization. Graph inputs that are initialized by initializers are displayed as `InitializedInput`, and are displayed closer to nodes that use them.\n\nNodes that implicitly capture values for their sub-graphs (Loop, Scan, etc.) will have an additional `(Capture)` node as input that connects all of the implicitly captured values with itself. As a special case, the subgraphs of an `If` node are flattened. The outputs of the two branches of an `If` node will be gathered by a `(Phi)` node to show connectivity. This modification in the graph ensures that all value dependencies are shown in the visualization.\n\n## Color Themes\n\nGet node color themes [here](./themes)\n\n## Visualizing PyTorch ONNX exporter (`dynamo=True`) accuracy results\n\n\u003e [!NOTE]\n\u003e `verify_onnx_program` requires PyTorch 2.7 or newer\n\n```py\nimport torch\nfrom torch.onnx.verification import verify_onnx_program\n\nfrom model_explorer_onnx.torch_utils import save_node_data_from_verification_info\n\n# Export the and save model\nonnx_program = torch.onnx.export(model, args, dynamo=True)\nonnx_program.save(\"model.onnx\")\n\nverification_infos = verify_onnx_program(onnx_program, compare_intermediates=True)\n\n# Produce node data for Model Explorer for visualization\nsave_node_data_from_verification_info(\n    verification_infos, onnx_program.model, model_name=\"model\"\n)\n```\n\nYou can then use Model Explorer to visualize the results by loading the generated node data files:\n\n```sh\nonnxvis model.onnx --node_data_paths=model_max_abs_diff.json,model_max_rel_diff.json\n```\n\n![node_data](./screenshots/node_data.png)\n\n## Screenshots\n\n\u003cimg width=\"1294\" alt=\"image\" src=\"https://github.com/justinchuby/model-explorer-onnx/assets/11205048/ed7e1eee-a693-48bd-811d-b384f784ef9b\"\u003e\n\n\u003cimg width=\"1291\" alt=\"image\" src=\"https://github.com/justinchuby/model-explorer-onnx/assets/11205048/b266d8e9-9760-4860-a0a7-eda1de31e1a1\"\u003e\n\n\u003cimg width=\"1285\" alt=\"image\" src=\"https://github.com/justinchuby/model-explorer-onnx/assets/11205048/b772aa13-4cc3-4034-a729-f134fa3cf818\"\u003e\n\n\u003cimg width=\"1292\" alt=\"image\" src=\"https://github.com/justinchuby/model-explorer-onnx/assets/11205048/dabbad76-0ec7-43b1-b253-13b81e7dc658\"\u003e\n\n\u003cimg width=\"1293\" alt=\"image\" src=\"https://github.com/justinchuby/model-explorer-onnx/assets/11205048/fbf2fa05-bd29-4938-93d1-709690d9f9c6\"\u003e\n\n\u003cimg width=\"1301\" alt=\"image\" src=\"https://github.com/justinchuby/model-explorer-onnx/assets/11205048/a68f7ecd-1fa1-4eac-9e1f-8e9a5bbf9fe3\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinchuby%2Fmodel-explorer-onnx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustinchuby%2Fmodel-explorer-onnx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinchuby%2Fmodel-explorer-onnx/lists"}