Skip to content
| Marketplace
Sign in
Visual Studio Code>Machine Learning>tensorVizNew to Visual Studio Code? Get it now.
tensorViz

tensorViz

tensorViz

|
3 installs
| (1) | Free
Explore PyTorch models, validate tensor shapes, and review source changes from the canvas or any compatible MCP coding agent.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

tensorViz for VS Code

Explore PyTorch models in the sidebar Canvas and review proposed Python changes in VS Code. The graph follows your source, including unsaved buffers.

Install and open

  1. Install tensorViz in VS Code. If you downloaded a VSIX, use Extensions: Install from VSIX…. To build your own, follow developer setup.
  2. Open a local model folder in VS Code 1.106 or newer.
  3. Click Open as Graph above an nn.Module, choose it in the tensorViz Models view, or run tensorViz: Open as Graph.
  4. Choose your existing Conda/venv. tensorViz checks compatibility and asks before installing missing libraries. Existing Torch/CUDA and other package versions are preserved. The graph opens in the secondary sidebar Canvas.
  5. tensorViz reuses saved setup or prepares a deterministic example, saves it in tensorviz.toml, and captures one forward call. Missing values appear in a closable left panel beside the source-only preview. Completing setup continues capture; no separate first-run Validate step is needed.

Not sure which configuration values or input shapes to use? Choose Get agent help (optional) in the setup panel to connect your coding agent through MCP. It can help prepare the saved setup; completing the form yourself works too.

Use the editor-title Show Canvas / Hide Canvas actions or Ctrl+Cmd+G on macOS (Ctrl+Alt+G on Windows/Linux). Hiding preserves the selected model, zoom, selection, expansion, validation and pending source review. Switching editors does not select a different graph. Source edits to the selected model still refresh it. Native VS Code resizing and moving remain available.

Open Canvas in Browser in the Canvas title opens that selected model/project through the authenticated browser transport. tensorviz.graphSurface is deprecated: saved browser and editor values now use the sidebar. Remove the old setting and use the explicit browser action when wanted. Presentation is retained for this window, not across a full window reload; a crashed or unresponsive renderer can recover only its last checkpoint. See sidebar lifecycle and migration.

The VSIX includes the webpage and backend; no checkout or Node.js is needed. Inspect source only opens without executing the model. Use tensorViz: Select Python Environment to change the workspace choice. Python 3.11+ is required.

If packages conflict or no environment is available, choose Use a separate tensorViz environment. Its download requires consent and internet access. tensorViz: Repair runtime repairs only that separate runtime.

Explore and edit

Pan, zoom, search, expand nested modules and use the Overview minimap. Select a node and click its file:line link at inspection zoom to open its source. Moving the editor cursor into a mapped layer focuses it on the graph. Parse errors leave the last graph visibly stale until the source is fixed.

Zoom into a layer and use its top-right Edit control for an inline source form. Supported forms include parameter/add/delete/group proposals. Choose Review in VS Code, then Apply source change or Discard proposal in the native diff's toolbar. Apply changes the unsaved buffer; native Undo restores it. Changed source or dependencies invalidate an old proposal.

To use your existing coding agent, run tensorViz: Connect coding agent (MCP). A status-bar item shows Off, Ready or Connected. The connection panel can configure a supported agent after approval or provide the URL for a Streamable HTTP client. The agent's open_graph tool opens and captures a model, completes missing setup and requests dependency installation in TensorViz's reported capture environment. It also inspects graphs, focuses a view and proposes edits for the same native review. tensorViz has no chatbot, provider-key setup or model calls. See MCP setup.

Edits stay within supported constructs in one owning class. Shared definitions affect every instance. Grouping changes parameter paths and checkpoint keys. Source review checks syntax and graph consistency, not runtime tensor correctness.

Share a graph file

Choose Export graph in the canvas to save a .tensorviz.json snapshot. Open graph file viewer opens the independent viewer for pan, zoom, search, module expansion, saved views, walkthroughs and layer/connection discussions. Choose an opening view for recipients, or compare two files to review architecture changes. Download the annotated file to share it. Recipients need a static viewer page and the file; they do not need Python or the extension. No public viewer is hosted yet. See graph files.

Capture and settings

After changing source, save and choose Refresh graph to capture again. Change inputs edits the saved setup. Generated dimensions are example values, not recovered training settings; a successful capture covers that invocation only. Required constructor objects or complex setup can use a workspace factory. See model profiles.

Capture on save is off by default. In a trusted workspace, tensorviz.traceOnSave reuses a matching saved profile in the selected interpreter. Missing or ambiguous setup refuses execution. Typing refreshes the source projection without running it.

Setting Use
tensorviz.pythonPath Interpreter hint; the workspace environment choice takes precedence
tensorviz.repoPath Developer checkout override; leave empty for packaged use
tensorviz.devServerUrl Developer frontend override; leave empty for packaged use

The selected Python environment runs captures and, when compatible, the backend. A separate managed backend remains available as a fallback. The backend launch token stays in VS Code; the browser receives a limited session credential. The MCP endpoint has no bearer credential and relies on its loopback bind and Host/Origin checks.

Optional analytics

TensorViz asks before sharing feature usage, performance and categorized errors. Sharing is off by default and respects VS Code telemetry permissions. Code, model contents, paths, prompts and raw exceptions are excluded. A random local installation ID helps measure returning use; it is not an account or machine ID. Use TensorViz: Manage Analytics Sharing, View Collected Analytics Data or Reset Analytics Identity from the command palette. Reset disables sharing; it does not delete data already received by PostHog. The standalone graph-file viewer has no analytics collector. See the packaged telemetry.json and the privacy and collection guide.

Support

tensorViz works with desktop VS Code on macOS, Windows and Linux. Use Python 3.11 or newer with your model's dependencies. Managed runtimes are available for macOS Apple Silicon, Windows x64 and Linux x64; other architectures need a compatible existing Python environment.

Desktop Remote SSH is supported too: install tensorViz on the SSH host and select Python there. For a coding agent on your desktop, use Forward MCP to This Desktop. See SSH setup and platform details for runtime requirements and other environment limits.

TensorViz's own code uses the MIT license. The bundled tldraw SDK and assets retain their separate license; see the licensing guide.

Documentation · Platform testing · Report an issue · Support

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft