ONNX viewer, model inspector and diagram visualizer
Drop in an ONNX model to see what is inside it, whether anything is wrong with it, and where the time goes. Inspect every operator and tensor, run a health and optimisation analysis, check compatibility with ONNX Runtime, TensorRT, OpenVINO, WebGPU and WASM, benchmark it in the browser, diff it against a second model, and export the whole architecture as a publication-ready diagram or the analysis as a report. Works with YOLO26, YOLO11, ViT, ResNet and any PyTorch export, entirely in your browser.
How to inspect an ONNX model
- 1
Export your model to ONNX
- 2
Drop the file on the canvas
- 3
Read the overview and inspect the graph
- 4
Analyze, compare and benchmark
- 5
Export the figure, the report or a narrated video
Why use this instead of a general ONNX viewer
Netron and similar viewers are built to read a model node by node, and they are very good at it. What they do not answer is the question you usually arrived with: is anything wrong with this export, what will my runtime do with it, and which part of it is slow. This tool starts from those, and gives you a publication-ready figure on the way out.
| Task | ONNX visualizer | General model viewer |
|---|---|---|
| Get a readable picture of a 400-operator export | Grouped into a few dozen named modules automatically | Every operator, scrolled by hand |
| Show parameter counts per stage | Annotated on each block and totalled for the model | Per tensor, read one node at a time |
| Drop noise like Reshape, Cast and Constant | One toggle, and the edges bridge across the gap | Not typically available |
| Put the diagram in a paper or slide | Transparent PNG at 1920 x 1080, vector SVG or AVIF, all 16:9 | Screenshot |
| Show a model walkthrough in a talk or on social | A narrated video of your model, spoken and captioned, or a silent zoom tour as MP4, WebM or GIF | Screen recording of a static graph |
| Match a figure to a column, slide or poster | Rotate the schematic; the canvas follows your light or dark theme | Fixed presentation |
| Inspect one node's attributes and shapes | Every attribute, input, output, dtype and parameter count | Full inspection, including raw weight values |
| Find out whether anything is wrong with the export | Structure, shape, graph and precision checks with plain-English findings | Read the graph and work it out |
| Know which operators your runtime will choke on | Per-operator verdicts for ONNX Runtime, TensorRT, OpenVINO, WebGPU and WASM | Not typically available |
| Find out which part of the model is slow | Benchmark in the browser, then map kernel time back onto the graph | Not typically available |
| See what changed between two exports | Side-by-side comparison plus a node-level diff | Open both and compare by eye |
| Open formats other than ONNX | ONNX only, by design | Many formats |
How it works
It decodes the graph, not the weights
The file is parsed with a minimal protobuf schema covering the ModelProto fields needed for structure. Tensor payloads are never decoded, only the initializer dims, which is where parameter counts come from.
Modules come from the export's own names
PyTorch writes hierarchical node names such as /model.2/cv1/conv/Conv. Operators are bucketed by that path, and each block is typed from the operators it contains, which is how SPPF, C2f, Attention, LayerNorm and MLP get their labels.
Analysis is proof, not guesswork
A Cast is only called redundant when its target type is the type its input already has, and a Transpose only when its permutation is the identity. Where the file carries no shape information, the report says so rather than filling the gap. An operator the tool has no entry for on a given runtime is reported as unverified, never as unsupported.
Layout is a real graph layout
Blocks are positioned with dagre, so ranks and edge routing reflect the actual data flow rather than a fixed template. Vertical and horizontal are the same layout with the rank direction flipped.
Hiding a type keeps the graph connected
Filtering walks through removed nodes to reconnect their neighbours, so dropping a run of Reshape and Cast leaves one clean edge instead of a broken diagram.
What it does not do
- ONNX only, up to 500 MB. The whole file is held in the tab's memory, so very large models want a desktop browser. Other formats need converting first.
- Module grouping needs the hierarchical names a PyTorch export writes. Graphs from other exporters fall back to the Detailed view.
- Weight values are never decoded, only their shapes and dtypes. You get parameter counts and tensor sizes, not the numbers themselves.
- Per-node output shapes come from the file's own value_info. Exports without shape inference show blanks; running onnx.shape_inference.infer_shapes first fills them in.
- Runtime compatibility is a starting point, not a guarantee. Coverage moves with every runtime version and execution provider, so an operator this tool has not been told about is reported as unverified rather than unsupported.
- Benchmarks are browser numbers on random input data. A native ONNX Runtime, TensorRT or OpenVINO build will usually be faster, and per-operator timings need WebGPU.
- The narrated walkthrough uses the browser's own speech synthesis, which has no capture API. The voice reaches the file only if you tick "share tab audio" in the picker; the captions carry every word regardless.
- Every export is 1920 x 1080, stills and video alike. The diagram is reshaped toward the page rather than cropped, but a model far from 16:9 will still leave margin at the sides, and a very deep one arrives at labels too small to read — export SVG for those, which has no fixed size.
Only have a .pt file?
A raw checkpoint usually stores just the weights, not the graph, and running an untrusted one executes arbitrary Python. Exporting is one line and works the same for pretrained and fine-tuned models. If you need weights to try it with, grab one from the model zoo.
# Pretrained or your own fine-tuned Ultralytics model
from ultralytics import YOLO
# yolo11n.onnx
YOLO("yolo11n.pt").export(format="onnx")
# Any custom PyTorch model
import torch
torch.onnx.export(model,
torch.randn(1, 3, 640, 640),
"model.onnx")Models it reads
Detection and segmentation
Ultralytics YOLO11, YOLOv8, YOLOv5 and RT-DETR, with Conv, C2f, SPPF and Detect blocks named.
Classification backbones
ResNet, EfficientNet, MobileNet and ConvNeXt come out as clean stage-by-stage stacks.
Transformers
ViT, Swin, DETR and BERT-style encoders, with Attention, LayerNorm and MLP inferred from their operator mix.
ONNX visualizer FAQ
- How do I visualize an ONNX model architecture?
- The visualizer opens with a sample model already loaded and its zoom tour playing, so you can see exactly what it does before uploading anything. To use your own, click "Upload your model" and drag an .onnx file in, or click to choose one. It parses in your browser and draws an interactive, colour-coded architecture diagram you can pan, zoom, filter and export.
- Is my model uploaded to a server?
- No. The file is decoded client-side, inside the browser tab. Your model never leaves your machine, so there is no upload wait and no privacy concern with proprietary or unreleased weights.
- Can I generate a diagram from a PyTorch .pt or .pth file?
- Not directly, because a .pt checkpoint usually stores only the weights, not the computation graph, and loading an untrusted one can execute arbitrary code. Export to ONNX first with model.export(format="onnx") for Ultralytics YOLO or torch.onnx.export(...) for any PyTorch model.
- How do I export the architecture diagram for a research paper?
- Open the download menu and pick a format: SVG for vector output that stays sharp at any zoom, PNG for a bitmap, or AVIF for the smallest file. Every export is 1920 x 1080 — the page and the file are the same size, across all three stills and the video — so a figure drops straight into a slide or a paper column. The vector is rasterised at that resolution rather than a smaller bitmap being stretched to it, so nothing is soft at 100%; past that, a raster has the detail it has, and SVG is the one to reach for. The diagram is laid out again for the page rather than shrunk into it: a deep model is widened into the frame instead of becoming a ribbon down the middle. PNG and AVIF are transparent. Each carries a small credit line in the corner, which is a real hyperlink in SVG.
- Can I hide or filter specific layers in the diagram?
- Yes. Every layer type is a toggle: click one to hide those blocks, or shift-click to show only that type. Edges are bridged across whatever you hide, so hiding Reshape still shows Conv connected to Add rather than a broken graph.
- What is the difference between the Modules and Detailed views?
- Detailed shows every ONNX operator, which is what you want when debugging an export. Modules groups operators by their PyTorch module path into named blocks, so a large model reads as a few dozen labelled stages. Modules is also the view that annotates parameter counts.
- Can I check an ONNX model for problems?
- Yes. The Health tab runs structural, shape, graph and precision checks: dangling tensor references, tensors written by two nodes, missing or dynamic shapes, dead nodes, unused initializers, redundant Cast, Transpose and Reshape chains, Dropout left in an inference export, non-standard operators and old opsets. Findings are written as sentences with the evidence attached, and every finding that points at specific nodes lets you click through to them on the graph. Passing checks are listed too, so you can tell "checked and fine" from "did not look".
- How do I see the input and output shapes of an ONNX model?
- The Model tab lists every declared input and output with its data type, shape, element count and tensor size in bytes. Symbolic dimensions are named and their axis positions given, so an input exported as [batch, 3, 640, 640] is shown with batch identified as dynamic rather than silently treated as 1.
- Can I see an operator's attributes, like kernel size and stride?
- Yes. Click any block in the Detailed view to pin it, and the inspector shows the operator type, domain, input and output shapes, data types, every attribute the file records, the parameter count and the weight bytes. Conv, pooling and Resize get their defining attributes promoted to the top, so kernel, stride and padding are the first things you read.
- Which runtimes will this ONNX model run on?
- The Runtimes tab checks the graph's operators against ONNX Runtime, TensorRT, OpenVINO, WebGPU and WebAssembly, and reports four states per operator: supported, supported with a caveat, documented as unsupported, or unverified. It also flags model-level issues such as dynamic shapes needing a TensorRT optimisation profile, or int64 tensors on a backend without 64-bit integers. Coverage changes with every runtime version and execution provider, so treat it as a starting point and verify against your target.
- Can I benchmark an ONNX model in the browser?
- Yes. The Speed tab runs the model with ONNX Runtime Web on WebAssembly or WebGPU and reports average, p50, p95 and p99 latency, FPS, warm-up and session load time. Warm-up iterations are timed separately and excluded from the statistics. On WebGPU it also collects per-kernel timings and maps them back onto graph nodes, so you can see which part of the model is slow and click straight to it. These are browser numbers on random input data, not deployment numbers.
- How do I compare two ONNX models or see what changed?
- Load a second .onnx in the Compare tab. You get a side-by-side table of file size, parameters, nodes, initializers, inputs, outputs, opset, IR version and precision, then a diff: nodes added, removed and changed, with the specific fields that moved, such as a Conv whose kernel went from 3x3 to 5x5 or a Resize whose mode changed. Nodes are matched by name where both exports name them and by operator type and position otherwise, and the report says which it used.
- Can I generate a narrated video about my model?
- Yes. Pick "Narrated walkthrough" from the download menu and the tool records a video of itself explaining your model: the file, its parameters and nodes, the opset and producer, every input and output with its shape and data type, the operators it is made of, the graph, the health findings, the optimisation leads and the runtime compatibility. The script is written from your file, so it describes that model and nothing generic. Only the tool's own area is recorded, side panels included, not the rest of the page. The narration is spoken in English by the browser's own voice and every sentence is also burned in as a caption, so the explanation is in the video either way. To keep the voice in the file itself, choose this tab in the browser's picker and tick "share tab audio".
- Can I export the analysis as a report?
- Yes. The Export menu offers the analysis as Markdown, for pasting into a pull request or an issue, and as JSON, for scripts and CI. Both carry the model overview, inputs and outputs, graph and operator statistics, health findings, optimisation opportunities and runtime compatibility, plus the benchmark and the model comparison when those were actually run.
- Is this a good Netron alternative?
- For understanding and checking a model, and for drawing an architecture figure, yes. Netron is a general viewer across many formats and it shows raw weight values, which this tool never decodes. Where this goes further is the analysis: health checks, optimisation opportunities, runtime compatibility, in-browser benchmarking with per-operator profiling, and a diff between two models, alongside module grouping and vector export. Many people use both.
- Which models does it work with?
- Any valid ONNX graph, since the parser reads the standard ModelProto rather than a framework-specific format. It has been built against Ultralytics YOLO11, YOLOv8, YOLOv5 and RT-DETR, classification backbones such as ResNet, EfficientNet and MobileNet, and transformers including ViT, Swin and DETR.
- How large an ONNX file can it open?
- Up to 500 MB. Because parsing happens in the browser, the whole file is held in the tab's memory while the graph is decoded, so very large models want a desktop browser with memory to spare rather than a phone. Weight payloads are skipped during decoding, so a large file costs scan time rather than proportional memory.
- Can I export an animation of the architecture being built?
- Yes. The default Zoom tour frames about five blocks at a time so they are readable, moves along the model as more appear, then pulls back to the whole architecture on the final frames. Build, Stages, Data flow and Trace are also available. Press Play to preview on the canvas, then export as video or as an animated GIF. Video is MP4 where the browser can encode H.264 and WebM otherwise, and everything is rendered in the browser.
- Do exports carry a watermark?
- Every download carries a small credit line, rizwanai.com/onnx-visualizer, in the corner of the frame. In SVG exports it is a real hyperlink back to the tool. The tool is free and needs no account, and the credit line is how it gets found.
- Who built this ONNX visualizer?
- Muhammad Rizwan Munawar, a computer vision engineer who works on YOLO, object tracking and model deployment. The tool came out of needing readable architecture figures for articles and papers, and it is free with no sign-up.
Feedback
This tool grows from what people run into. If a model draws badly, a module is mislabelled, or you need an export the menu does not have, say so. Messages come straight to me, so include the model and what you expected to see.
Keep reading
Built by Muhammad Rizwan Munawar, a computer vision engineer working on YOLO, tracking and model deployment.