ONNX visualizer & architecture diagram generator

Upload an .onnx model to get a clean, colour-coded architecture diagram. The Modules view collapses the raw ops into high-level blocks (Conv, C2f, SPPF, Attention, MLP…) for a paper-ready picture; switch to Detailed for every operation. Pan, zoom, and export as SVG or PNG. It runs entirely in your browser, so your model never leaves your machine.

Only have a .pt file?

A raw .pt checkpoint usually stores just the weights, not the graph (and running an untrusted one is a security risk), so the visualizer reads ONNX instead. Exporting is one line and works the same for pretrained and custom models:

# Pretrained or your own fine-tuned Ultralytics model
from ultralytics import YOLO
YOLO("yolo11n.pt").export(format="onnx")   # -> yolo11n.onnx

# Any custom PyTorch model
import torch
torch.onnx.export(model, torch.randn(1, 3, 640, 640), "model.onnx")

ONNX visualizer FAQ

How do I visualize an ONNX model architecture?
Drag an .onnx file onto the visualizer above (or click to choose one). It parses the model in your browser and draws an interactive, colour-coded architecture diagram. The Modules view collapses the raw operators into high-level blocks like Conv, C2f, SPPF, Attention and MLP; the Detailed view shows every operation.
Is my model uploaded to a server?
No. The ONNX visualizer runs entirely in your browser using client-side parsing. Your model never leaves your machine, which also means there is no size queue and no privacy concern with proprietary 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 your model to ONNX first — it is one line, `model.export(format="onnx")` for Ultralytics YOLO or `torch.onnx.export(...)` for any PyTorch model — then drop the .onnx file in.
How do I export the architecture diagram for a research paper?
Use the SVG or PNG buttons in the toolbar. SVG is vector, so it stays crisp at any size in a paper or slide; PNG is rendered at 2x for print. Both use a clean white background and are self-contained.
What is the difference between the Modules and Detailed views?
Detailed shows every ONNX operator (hundreds of nodes for a large model). Modules groups those ops by their PyTorch module path into high-level blocks, so a YOLO or transformer reads as a handful of labelled modules instead of a wall of low-level ops — the clean, publication-style diagram.