Neural-network model analyzer for edge deployment.
A Netron-style graph viewer, an edge hardware advisor and an AI copilot in one tool.
It ships as a website, a desktop app and a VS Code extension, all built from the same code.
Open the web app · Download the desktop app · Features · Formats · CLI and CI
ModelVisio is a free, open-source neural network model viewer and edge AI analyzer that runs in your browser. Open an ONNX, TFLite, PyTorch, GGUF or Safetensors model to get a Netron-style interactive graph, then answer the deployment questions: will it compile for Coral Edge TPU, Hailo, RKNN or Kneron, and what FPS and memory fit can you expect on 21 edge accelerators, from Jetson to RK3588?
Getting a trained model onto edge hardware involves a lot of guesswork. Which accelerator should you use? Will the model fit in memory? Which ops fall back to the CPU? How fast will it run? ModelVisio answers these from the model file itself. Drop in a model and you get, in the browser:
- an interactive graph of the model with a per-layer inspector
- a compiler pre-flight that flags op-support problems for each target, plus auto-fixes you can undo
- a hardware-fit score for 21 edge accelerators based on a roofline model (estimated FPS, FPS/W, memory fit)
- format conversion and copy-paste deploy scripts
- an AI copilot that sees the computed analysis of your model when it answers
All product logic lives in packages/. The web, desktop and VS Code apps mount it unchanged, so a
fix in the core reaches all three.
| OS | Installer |
|---|---|
| macOS (Apple Silicon and Intel) | ModelVisio-macOS-universal.dmg |
| Windows (x64) | ModelVisio-Windows-x64-setup.exe |
| Linux (x86_64) | ModelVisio-Linux-x86_64.AppImage. .deb and .rpm are on the Releases page. |
macOS: open the .dmg and drag ModelVisio into Applications. The app isn't notarized yet, so
macOS blocks the first launch. Open it once, then go to System Settings > Privacy & Security and
click Open Anyway. On macOS 14 and older, Control-click the app and choose Open instead. You
can also run xattr -dr com.apple.quarantine /Applications/ModelVisio.app.
For troubleshooting, updates and uninstalling, see docs/install-macos.md.
![]() |
![]() |
![]() |
![]() |
| Feature | What it does |
|---|---|
| Graph and inspector | Netron-style DAG (dagre layout) with per-layer shapes, weights, FLOPs/MACs and quantization sensitivity. Exports to SVG or PNG. |
| Compiler pre-flight | Rule-based op-support checks for every parsed model against the vendors' documented limits (Coral Edge TPU op list and tensor rules; data-dependent ops and dynamic shapes on RKNN, Hailo and Kneron), plus memory warnings, shown on the graph. It flags known problems only; the vendor compiler has the final word. |
| Auto-fix | Graph transforms you can undo: SiLU to HardSwish, SPPF to parallel SPP, Resize to ConvTranspose, channel pruning. The graph, stats and compatibility results update as you apply them. |
| Hardware-fit scoring | Roofline model for 21 edge accelerators: estimated FPS, FPS/W, whether the model is compute- or memory-bound, a memory-fit check and op-support coverage. Each device is marked as calibrated or estimated. |
| Converter | Graph JSON, Layers CSV, Safetensors and NumPy exports in the browser, plus conversion kits for native toolchains. |
| Deploy scripts | Ready-to-run TensorRT, HailoRT and RKNN deployment scripts. |
| AI copilot | Google Gemini or xAI Grok, given your model's computed analysis, with cited live sources (Google Search grounding or a free, keyless web search). The API key never reaches the browser. |
| Quantization heatmap | Per-layer INT8/INT4 sensitivity estimated from weight statistics and op type, shown as a graph colour overlay. Exports a mixed-precision plan for ONNX Runtime or TFLite. |
| Model advisor | Ranked, device-specific recommendations (quantization plan, op fixes, input resolution, memory-bound layers), each with estimated latency and size impact. |
| Benchmark | Runs ONNX models on this device with onnxruntime-web (WebAssembly, WebGPU or WebNN) in a Web Worker: latency percentiles, throughput, optional per-op profile, compared with the roofline prediction. The CPU runtime (14 MB) ships with the app; the WebGPU/WebNN runtime (27 MB) is downloaded from a version-pinned CDN URL on first use and checked against its SHA-256. |
| Performance investigator | Finds the bottleneck layers and patterns for a target device, then asks the AI for ranked hypotheses that must cite that evidence. Falls back to a rule-based report without a key. |
| Optimization search | Searches device × runtime × precision × auto-fix × input-size combinations and shows the Pareto frontier of latency, size and accuracy risk. |
| Deployment agent | Plans a deployment from a goal ("Jetson Orin Nano at ≥30 FPS") with tool calls, and produces a ZIP with conversion, inference and validation scripts. Has a rule-based planner when no AI key is set. |
| Fleet simulation | Estimates latency, queueing delay, SLO attainment, memory fit and energy across a mixed fleet of devices, with optional seeded Monte-Carlo variance. |
| Model registry | Local registry of model versions (hash, stats, compatibility, estimates) with version diffs and JSON import/export. |
| CLI and GitHub Action | modelvisio inspect / check / diff / registry for CI, with budget and regression gates and JUnit or Markdown reports. See docs/ci. |
flowchart TB
subgraph ENGINE["packages/: shared engine"]
parsers["parsers<br/>model files → normalized graph<br/>(pure TS, no React)"]
core["core<br/>all UI: graph · inspector · compiler ·<br/>scoring · converter · chat"]
ai["ai<br/>prompt templates + client ·<br/>Gemini / Grok proxies · web search"]
end
subgraph SHELLS["apps/: platform shells"]
web["web<br/>Vite + React → Vercel / Netlify"]
desktop["desktop<br/>Tauri 2 native window (~10 MB)"]
vscode["vscode<br/>custom editor for model files"]
end
parsers --> core
ai --> core
core --> web
core --> desktop
core --> vscode
Every parser produces the same Model shape ({ layers, edges, stats… }), so the graph, inspector
and scoring work the same way whatever the source format is. Files are parsed in a Web Worker so the
UI doesn't freeze on large models.
flowchart LR
F["Model file<br/>.onnx · .tflite · .pt · .gguf · .safetensors"] --> W["Web Worker"]
W --> D{"detectFormat<br/>extension + magic bytes"}
D --> P["Format parser"]
P --> M["Normalized Model<br/>layers · edges · params · FLOPs"]
M --> G["Graph + Inspector"]
M --> S["Roofline scoring"]
M --> C["Compiler pre-flight"]
The 0-100 score is computed from the model. It uses the roofline model (Williams, Waterman and
Patterson, CACM 2009): for each layer, attainable throughput is
min(peak_compute, bandwidth × arithmetic_intensity). The per-layer results are summed and then
scaled down by a utilization factor for the workload type. Where public benchmarks exist (NVIDIA
Jetson AGX Orin and Hailo-8, from MLPerf and vendor ResNet-50 numbers) the factor is calibrated
against them. Elsewhere it is an estimate, and the UI says which one you are looking at. If a model's
memory footprint is larger than the device's memory, the score is capped at 15 so it can never show
as a good fit.
flowchart TB
M["Model<br/>per-layer MACs · shapes · ops"] --> R["Per-layer roofline<br/>min(peak compute, BW × intensity)"]
D["Device spec<br/>dense TOPS · bandwidth · RAM · SRAM"] --> R
R --> U["× utilization<br/>calibrated (MLPerf/vendor) or estimated"]
U --> FPS["Est. FPS · latency · FPS/W"]
M --> MEM{"Footprint > device memory?"}
MEM -- yes --> FAIL["Hard fail · score ≤ 15"]
MEM -- no --> SUB["Sub-scores<br/>latency · memory · op support · efficiency"]
FPS --> SUB
SUB --> SCORE["0-100 fit score<br/>+ confidence + source"]
The research behind the device numbers and weights is in docs/roofline-scoring-research.md.
The chat request is the same in every app. Only the proxy that holds the API key changes, and the key never reaches the browser or WebView. It lives in a serverless function (web), a Vite dev middleware (local development), the extension host (VS Code) or the Tauri Rust side (desktop). Each request includes a summary of the model's analysis: the top device scores, bottleneck and quantization-sensitive layers, and compiler issues. That lets the copilot answer about your model rather than in general terms.
flowchart LR
chat["Chat UI · POST /api/chat<br/>(model analysis included)"] --> PROXY{"Per-app proxy<br/>holds the provider key<br/>GEMINI_API_KEY or XAI_API_KEY"}
PROXY -->|web prod| V["Vercel / Netlify function"]
PROXY -->|web dev| MW["Vite dev middleware"]
PROXY -->|VS Code| EH["Extension host"]
PROXY -->|desktop| RS["Tauri Rust command"]
V & MW & EH --> WS["Free web search, when the turn needs live facts<br/>DuckDuckGo / SearXNG → read top 3 results<br/>via the SSRF-guarded scraper"]
WS --> PICK{"Provider"}
RS --> PICK
PICK -->|gemini| GEM["Gemini API<br/>(+ Google Search grounding)"]
PICK -->|grok| GROK["xAI Grok API"]
GEM --> OUT["text + cited sources"]
GROK --> OUT
Gemini or Grok. Each proxy talks to Google Gemini (default; free key at
https://aistudio.google.com/apikey) or xAI Grok (key at https://console.x.ai, default model
grok-4.7). Web proxies pick from MODELVISIO_PROVIDER (gemini | grok; when unset, Gemini if a
Gemini key is set, else Grok if XAI_API_KEY is). VS Code uses the modelvisio.provider setting or
ModelVisio: Select AI Provider; the desktop app has a Gemini/Grok toggle in the copilot key panel.
The chat request, UI and time-budget behavior are the same for both.
Free web search. For live facts (docs, links, versions, releases, benchmarks, op support,
comparisons) the proxy searches the web without an API key: DuckDuckGo's no-JS HTML endpoint,
or your own SearXNG instance via MODELVISIO_SEARXNG_URL. It reads the top 3 results through the same
guarded scraper as pasted URLs and passes them in as fenced, untrusted text the model cites as
[Web n]; they come back as the answer's sources. It runs for Grok, and for Gemini when Google Search
grounding (MODELVISIO_WEB_SEARCH) is off. MODELVISIO_FREE_SEARCH=auto|always|off: auto (the
default on Vercel and in pnpm dev) searches only when the question asks for something live; Netlify
defaults to off (10s free-tier limit). Research is capped at about 9s or 40% of the turn's budget, and
if the search fails (for example, DuckDuckGo rate-limits a data-centre IP; use SearXNG there) the
copilot still answers and says live results were unavailable. Web and VS Code only (VS Code:
DuckDuckGo, set by modelvisio.freeWebSearch); not on desktop yet.
Paste a URL and the copilot reads it. You can paste a URL into a chat message (a vendor
op-support page, a spec sheet, a GitHub issue, a changelog). The server-side /api/scrape proxy
fetches it, strips it down to readable text and passes it to the model as fenced, untrusted context
for that turn and the ones after it. The scraper refuses private, loopback and cloud-metadata
addresses, including hostnames that resolve to them and any redirect that leads to them (every hop
is checked before it is requested), and it limits size, time and content type. To restrict it to
known docs sites, set MODELVISIO_SCRAPE_ALLOWLIST (in VS Code, the modelvisio.scrapeAllowlist
setting). URL reading works on the web, in VS Code and in the desktop app, where a Rust port of the
scraper does the fetch and pins each connection to the addresses that passed the check.
# needs Node 18+ and pnpm 10+
pnpm install
pnpm dev # web app at http://localhost:5173Click Try the demo · YOLO26n to try it without a file, or drop in your own model. You don't need to build anything to try it: the hosted app is at https://modelvisio.netlify.app/.
- Get a free Gemini key at https://aistudio.google.com/apikey. No billing is needed. Or get an xAI Grok key at https://console.x.ai.
- Copy
.env.exampleto.envin the repo root and set the key:GEMINI_API_KEY=your-key-here # or, for Grok: # MODELVISIO_PROVIDER=grok # XAI_API_KEY=your-xai-key-here
- Restart
pnpm devand open the AI tab.MODELVISIO_MODEL,MODELVISIO_GROK_MODEL,MODELVISIO_WEB_SEARCH,MODELVISIO_FREE_SEARCHandMODELVISIO_SEARXNG_URLare optional (see.env.example).
The key stays on the server. See Security.
| App | Develop | Build and release |
|---|---|---|
| Web | pnpm dev |
pnpm --filter @modelvisio/web build, then deploy to Vercel (Root Directory apps/web, set GEMINI_API_KEY, or XAI_API_KEY with MODELVISIO_PROVIDER=grok) or Netlify (netlify.toml is included). After a production deploy, pnpm indexnow tells Bing and other IndexNow engines which pages changed. |
| Desktop (Tauri 2) | pnpm --filter @modelvisio/desktop dev |
pnpm --filter @modelvisio/desktop build. Needs the Rust toolchain. Push a desktop-v* tag to build installers with GitHub Actions. The desktop app adds File → Open Recent. |
| VS Code | Open apps/vscode as the workspace folder and press F5 |
pnpm package:vscode produces apps/vscode/modelvisio.vsix. Push a vscode-v* tag to attach it to a GitHub Release (and publish to the Marketplace if VSCE_PAT is set). |
The extension opens model files in a custom editor that runs the same app. Extensions that only
model files use (.onnx, .tflite, .pt, .safetensors, .gguf and others) open in ModelVisio
by default. Generic ones (.json, .bin, .xml, .pb, .h5 and others) keep their usual editor,
and you can right-click and choose Open with ModelVisio. Parsing runs in a Web Worker, the view
reloads when the file changes, and exports open a native Save dialog. To use the AI copilot, run
ModelVisio: Set Gemini API Key (or Set Grok (xAI) API Key, then Select AI Provider).
Keys are stored in VS Code's encrypted Secret Storage and are never sent to the WebView.
pnpm build:vscode # out/extension.js (esbuild) + media/ (vite)
pnpm --filter modelvisio-vscode test # host and webview unit tests
pnpm package:vscode # builds apps/vscode/modelvisio.vsix
code --install-extension apps/vscode/modelvisio.vsixCommands, settings, privacy details and architecture are in apps/vscode/README.md.
All parsers produce the normalized Model. Fully parsed formats show a complete graph. The others
are detected and shown as metadata, and the UI labels them that way (see FORMAT_SUPPORT).
| Fully parsed | Detected (metadata only) |
|---|---|
ONNX, TFLite, PyTorch (.pt/.pth), Safetensors, GGUF, NumPy, Darknet, Core ML (.mlmodel, zipped .mlpackage), OpenVINO IR, TensorFlow (GraphDef, SavedModel, .pbtxt), Keras (.keras, .h5), Caffe, PaddlePaddle (.pdmodel), ncnn, MNN, RKNN, MLIR, scikit-learn |
Compiled Core ML (.mlmodelc), Paddle params / Paddle Lite, TorchScript, ExecuTorch, TensorRT engines and the other formats in FORMAT_SUPPORT |
Formats whose weights live in a separate file (OpenVINO .bin, ncnn .bin, Paddle .pdiparams,
TF.js shards, SavedModel variables/) read it for weight statistics. VS Code, the desktop app and the
CLI load it from the model's folder automatically; in the browser, select or drop both files
together. Without it the graph, shapes and parameter counts are complete and a note says which file
would add the statistics. A Keras architecture JSON with a separate model.weights.h5 is not read
yet (.keras and full .h5 files carry their weights).
ONNX models without intermediate value_info have their shapes inferred (including Split,
Resize and computed Reshape targets), so FLOPs stay complete. If the input height/width is
dynamic, the parser uses an imgsz entry from the model metadata when there is one and otherwise
says the FLOPs are incomplete.
ONNX has the most complete support (onnxruntime-web + protobufjs). Models of 100MB and up
are parsed in a Web Worker and stream into the graph as they are parsed (layer by layer for ONNX
and TFLite).
pnpm -r --if-present test # parsers, core, ai (providers, search, scrape, client), cli and the VS Code extension
pnpm -r typecheck # all packagesEach parser is tested against a real model file. The scoring engine, auto-fix transforms, calibration and component rendering also have tests.
packages/
core/ React component library: graph, inspector, scoring, converter, chat, fixes
parsers/ model-format parsing into the normalized Model (pure TS)
ai/ prompt templates and client; server-only Gemini/Grok proxies, free web search, URL scraper
cli/ `modelvisio` command-line tool for CI (inspect, check, diff, registry)
apps/
web/ Vite + React; serverless /api/chat proxy; deploys to Vercel or Netlify
desktop/ Tauri 2 app (Rust code for the native menu, file dialog and AI command)
vscode/ custom editor that opens model files in a WebView
- The AI provider key (Gemini or xAI Grok) is never sent to the client. It only exists in the server-side proxy for each app (serverless function, Vite dev middleware, VS Code extension host or Tauri Rust code).
- Crawled text is untrusted. Pasted URLs and free-web-search result pages are read through the SSRF-guarded scraper (no private, loopback or metadata hosts, size and time caps, optional allowlist) and fenced in the prompt as data the model must not take instructions from.
- Models are parsed locally in a Web Worker. Your files are not uploaded.
- Usage logging is opt-in per deployment. When
SUPABASE_URLandSUPABASE_SERVICE_ROLE_KEYare set on the server, the/api/chatproxy records model loads (file name, format, size, parameter and layer counts) and chat queries. Without them nothing is logged. See.env.example.
- Phase 1 (done): graph, inspector, compiler pre-flight, auto-fix, deploy scripts
- Phase 2 (done): quantization heatmap, on-device benchmarking, a more detailed hardware advisor
- Phase 3 (done): AI performance investigator, cross-compiler optimization search
- Phase 4 (done): AI deployment agent, fleet simulation, model registry and CI/CD
- Next: op-level compiler issues from every parser (today only the demo model carries them), measured accuracy for quantization plans
TypeScript, React 18, Vite 5, Tailwind with a shared theme context, pnpm workspaces, Tauri 2 (Rust),
the Google Gemini and xAI Grok APIs, dagre for graph layout, Vitest, onnxruntime-web and protobufjs.
Contributions of any size are welcome, from a typo fix to a new format parser or edge device.
Product code goes in packages/, and the web, desktop and VS Code apps pick it up from there.
Features belong in packages/core (UI) or packages/parsers (formats). The apps in apps/ only
hold platform code such as file pickers, hosting and WebView bridges.
| You want to | Start here |
|---|---|
| Report a bug | Open an issue and pick Bug report |
| Request a feature, device or format | Open an issue and pick Feature request |
| Add a model-format parser | packages/parsers (see Extending ModelVisio) |
| Add an edge accelerator to hardware scoring | packages/core/src/data/hardware.ts |
| Add a compiler auto-fix | packages/core/src/fixes/transforms.ts |
| Add an AI provider | packages/ai (see Extending ModelVisio) |
| Improve the UI or a component | packages/core/src/components |
| Improve the docs | this README or apps/*/README.md |
| Ask a question or share an idea | Discussions |
git clone https://github.com/Premchand006/ModelVisio.git
cd ModelVisio
pnpm install
pnpm dev # web app at http://localhost:5173
pnpm -r typecheck # type-check every package
pnpm -r --if-present test # run the testsIf you're new to the code, read ARCHITECTURE.md first. It covers the
architecture and conventions. Then run pnpm dev and click Load Demo · YOLO26n.
There are four common kinds of addition. Each is plain TypeScript with a test.
- New format parser (
packages/parsers). A parser takes the file's bytes and returns the normalizedModelshape ({ layers, edges, stats… }). Once it does, the graph, inspector, scoring and copilot all work for that format with no other changes.- Add
detectFormathandling (extension and magic bytes) and register it insrc/registry.ts. - Return the normalized
Model(see theModelLayerandModeltypes inARCHITECTURE.md). - Add a test that uses a small, real model file in
packages/parsers/test. - If the format is fully parsed, add it to the "Fully parsed" list. Otherwise register it in
FORMAT_SUPPORTso the UI shows it as "detected (metadata)".
- Add
- New edge device (
hardware.ts). Add aDeviceSpecwith dense TOPS, bandwidth, RAM/SRAM and power. If a real benchmark (MLPerf or vendor) exists, calibrate the utilization factor from it and mark it as calibrated. Otherwise an estimate is fine, but mark it as one. - New auto-fix (
transforms.ts). Write a pure graph transform that can be undone, plus a check for when it applies, so the compiler pre-flight can offer it. - New AI provider (
packages/ai). Followsrc/grok.ts: a standalone, server-only module (not re-exported fromindex.ts, so its key never enters the browser bundle) that takes the Anthropic-style{ system, messages }and returns{ text, sources }.- Honor the time-budget contract: abort at
timeBudgetMswithError("TIMEOUT"), and only wait out a 429/5xx retry if it still fits the budget. - No runtime relative imports.
apps/web/vite.config.tsloads these files with Node's type-stripping, so use erasable TS syntax andimport typefor sibling modules. - Add a
package.jsonexport, then register the provider and its key/model env vars insrc/providers.ts. - Wire it into the proxies (
apps/web/api/chat.ts,netlify/functions/chat.ts, the dev middleware invite.config.ts), the VS Code bridge (apps/vscode/src/bridge.tsplus a key slot inapiKey.ts), and the desktop Rustchatcommand. - Add a test with a mocked
fetchinpackages/ai/test. No real network calls or keys.
- Honor the time-budget contract: abort at
Please include:
- For bugs: what you did, what you expected and what happened; the model format (and a small sample file if you can share one); your browser and OS or the app version; and any console errors.
- For security or API key problems: don't open a public issue. See Security and email the maintainer.
- Branch off
mainand keep each PR to one change (see the build order inARCHITECTURE.md). - Follow the conventions: one component per file in
core, pure functions with no React imports inparsers/andai/, the shared theme context, and the style of the surrounding code. - Every parser change needs a test with a real model file.
- Before pushing, make sure this passes:
pnpm -r typecheck && pnpm -r --if-present test
- Describe what changed and why, and link the issue it closes. Small PRs are easier to review.
Be respectful, assume good intent and keep feedback about the code. Harassment isn't welcome. Maintainers may edit or close contributions that don't fit the project's direction.
MIT © 2026 Premchand (@Premchand006).




