TENSORVIZ FOR VS CODE
Your model.
Ready to explore.
Start with your PyTorch project and the Python environment you already use. tensorViz puts the graph beside your code.
Install in VS Code Early preview · Free to installOr find tensorViz in Extensions, or open the Marketplace listing. Also available on Open VSX.
HOW TO USE TENSORVIZ
From Python to your first graph.
Watch the complete workflow, or jump to exploring a model, reviewing a change, or connecting your coding agent.
The video could not load. Open the video directly, or explore the interactive example.
YOUR FIRST GRAPH
Three steps.
One clearer model.
Need something to try? Download the example model ↓ Save it in a folder and open that folder in VS Code.
Debugging a shape error? Work through a flatten-to-Linear mismatch with a small runnable example.
-
Open your model
With the extension installed, open your PyTorch project. Choose Open as Graph above an
nn.Module, select the class in tensorViz’s Models view, or run tensorViz: Open as Graph from the Command Palette. -
Choose its Python environment
Select your existing Conda or virtual environment. tensorViz checks compatibility and asks before installing missing libraries; existing Torch/CUDA versions are preserved.
If you need a separate environment, choose Use a separate tensorViz environment. The managed runtime downloads after consent.
-
Prepare an input and explore
tensorViz reuses saved setup or resolves an editable example, then captures one forward call. If inputs or constructor values are missing, fill them in beside the source-only preview. Open graph saves the setup and continues the capture.
Expand a block, follow its tensor shapes, and click a source link to return to the Python. Inputs edits your saved setup. Save code changes, then refresh to capture again. Choose Inspect source only when you want to browse without running the model.
YOUR COMPUTE CAN STAY REMOTE
Code here. Run there.
Open your project through desktop VS Code Remote SSH. Install tensorViz on the SSH host, then choose the remote Python environment. Source files, the backend, and model execution stay on the server; the sidebar Canvas appears on your desktop.
Use Open Canvas in Browser for a larger view. If your coding agent runs on your desktop, choose Forward MCP to This Desktop in the connection guide and use the URL it provides.
Choose Python on the SSH server
In the connected SSH window, run tensorViz: Select Python Environment and choose the server's existing Python, Conda or virtual environment. Manually entered paths also refer to the server. Open your model with Open as Graph and complete any missing inputs.
Missing dependencies are reviewed before installation; existing Torch/CUDA versions are preserved. A separate managed environment is available on remote Linux x64 and downloads only after consent.
Connect an agent on the server or your desktop
Run tensorViz: Connect coding agent (MCP) in the SSH window. For an agent running on the server, use the URL shown in that guide. For a desktop agent, choose Forward MCP to This Desktop and use its returned URL instead. Model files and Python execution stay on the server.
After reconnecting SSH or closing the tunnel, forward again and update the desktop agent's URL. Use tensorViz: Disconnect coding agents (MCP) to revoke connections and disable automatic reconnection on that host.
Reopen the graph after an SSH interruption
Reconnect the SSH window, then show the Canvas again or choose Open Canvas in Browser from VS Code. An old browser tab cannot repair a closed or changed forwarded address; reopen it from the extension so tensorViz resolves the current connection.
This setup covers desktop VS Code Remote SSH. WSL, dev containers and Codespaces are outside the current support boundary. Recorded platform checks and limits ↗
REVIEWING A CHANGE
See the change before it lands.
Compare a code diff or pull request
Choose Graph diff from an open Python diff, or Open PR in the Canvas. Review affected models in Before / Diff / After views beside the native code diff. This compares source without executing either revision; coverage notes identify unresolved parts.
Propose an edit from the graph
Zoom in to a layer and choose its Edit control, then Review in VS Code. Inspect the complete Python diff and choose Apply source change or Discard proposal in the native toolbar.
Apply changes the unsaved buffer. Native Undo restores it. Save explicitly before refreshing the graph; source review checks syntax and graph consistency, not runtime tensor correctness.
CONNECT YOUR CODING AGENT
The model, in your agent’s context.
MCP lets your existing coding agent read tensorViz’s structured model evidence. It can help prepare inputs, inspect captured operations and tensor shapes, and propose source changes. You can also do the core workflow entirely through the normal forms.
- Open VS Code with tensorViz installed.
- Run tensorViz: Connect coding agent (MCP) from VS Code’s Command Palette.
- Follow the connection guide to configure a supported agent, or copy its URL into a client that supports MCP Streamable HTTP. Use the URL the guide shows; no Authorization header is needed.
- Ask the agent to open your model, help with missing setup, and inspect the captured layers. Native Apply/Discard review still controls source proposals.
The endpoint runs beside your workspace and is reachable by local processes. In Remote SSH, use explicit forwarding for a desktop agent. Your connection preference persists across VS Code restarts. tensorViz: Disconnect coding agents (MCP) revokes sessions across windows and disables automatic reconnection.
PYTHON & OS COMPATIBILITY · 7 OCTOBER 2026
Keep your model’s environment.
Extension 0.1.5 supports model capture with Python 3.10–3.14 and compatible PyTorch. The tensorViz service and installer use a separate Python 3.11+ environment, so a Python 3.10 model does not need to migrate. Missing libraries are reviewed before installation; existing package versions are preserved.
Tested Python patches: 3.10.22, 3.11.17, 3.12.15, 3.13.16 and 3.14.8. Linux tests ran on a personal RunPod CPU instance. Installed Linux checks used VS Code with a virtual display and a browser connection; native desktop interaction was not certified. Windows, other OS releases, other architectures, CUDA and free-threaded Python remain unverified.
Python 3.10 and experimental 3.15 limits
Python 3.10 captures models, but expression-level source edits need Python 3.11 or newer. Python 3.15.0rc3 is experimental: the Linux CPU checks passed with prerelease dependencies and a source-built package; macOS capture was blocked by the missing compatible PyTorch wheel. It is not part of the stable compatibility range.
Models assembled across files or inside a pipeline
In Inputs, choose Use a custom factory. Select your existing model builder, or return the selected component from a larger pipeline. Modules can stay in their original files. The factory must return the class you opened. Python imports keep their normal behavior; tensorViz does not silently remove imports to make a capture succeed.
Large models and the standalone coding-agent plugin
This pass does not establish a parameter-count limit or verify a 4B model. Available memory, model construction and the selected forward call still matter. The standalone compiled plugin has a separate verified target: macOS Apple Silicon with CPython 3.12. This extension matrix does not certify that plugin on Linux or other Python versions.
SUPPORT & CURRENT LIMITS
A few things to know.
Find runnable CPU examples and report reproducible problems in Examples & issues on GitHub ↗. This public hub contains examples and support; the extension source remains private.
The graph will not open
Use tensorViz: Select Python Environment and choose
a compatible model environment with Python 3.10–3.14. The separate
tensorViz service needs Python 3.11+. Check the tensorViz output
channel for the reported dependency or parsing issue. Leave
developer settings tensorviz.repoPath and
tensorviz.devServerUrl empty for this packaged preview.
Capture needs inputs or shows stale source
Save the model and its Python dependencies first. Capture requires a trusted workspace and the selected environment’s PyTorch and model dependencies. Complete missing constructor or input values in Inputs, then refresh. Source-only inspection remains available without running the model.
Which editors and platforms are supported?
The extension targets desktop VS Code on macOS, Windows and Linux, plus desktop Remote SSH. The latest compatibility pass verified macOS 26.4 Apple Silicon and Ubuntu 24.04.5 x86_64; Windows and other OS releases remain unverified in that pass. Managed runtimes are available for macOS Apple Silicon, Windows x64, and Linux x64; other architectures need a compatible existing Python environment. WSL, dev containers, and Codespaces are outside the current support boundary. Recorded platform checks and limits ↗
What is included in a shared graph?
A .tensorviz.json snapshot preserves architecture,
layout and saved explanations. It excludes model source and weights.
File sharing has no account, automatic synchronization or public
model-publishing service.
PACKAGE DETAILS
The Marketplace extension bundles the Canvas, local browser page, and backend. No repository checkout or Node.js installation is required. The website’s embedded viewer and recorded examples retain their own build provenance below.