tensorViz — PyTorch & JAX Model VisualizerContentsFollow tensor shapes through your model, beside the Python you are editing. tensorViz opens a PyTorch Extension 0.1.36. Shapes describe the example input you capture.
PyTorch captured shapes describe one input and execution path. Graph diff compares source without executing either revision; unresolved coverage stays visible. Free to install. Core graph exploration and source forms work without a coding agent. Get started · Watch the walkthrough · Try the Model Explorer · Examples and issues Source, examples, and issues are in this repository: tensorviz-org/tensorviz. The browser examples are recorded snapshots and need no installation. Open your own model in VS Code to capture it in your selected Python environment. Your first graph
Capture and service Python minima are in the versions table. The capture environment needs compatible PyTorch and your model's dependencies. The service can use a managed environment after your approval. Inspect source only does not execute your model. No repository checkout, Node.js or coding agent is required. Full setup and troubleshooting · Remote SSH · Python and platform compatibility Use Show Canvas / Hide Canvas or Ctrl+Cmd+G on macOS (Ctrl+Alt+G on Windows/Linux) to toggle the sidebar without losing your selected model. Open Canvas in Browser opens it in a separate browser view. If setup fails, its inline controls let you retry; tensorViz: Select Python Environment changes the model environment and tensorViz: Repair runtime repairs only the separate tensorViz runtime. See the opening guide. JAX and FlaxInstall compatible
An input of shape JAX support traces on the saved CPU or CUDA device and labels shapes as inferred. Control flow primitives retain their boundary and report partial coverage; tracing does not claim a branch executed. PyTorch source edits are unavailable for these graphs. The shared capture worker still requires Torch. Explore and editPan, 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. Turn on Code focus in the Canvas header to open each selected node's source beside the graph; double-click or Enter on a layer moves keyboard focus to it. The chevron beside it can dim unrelated code. With the Canvas maximized, showing source restores the split so the code appears beside it. 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 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 fileIn Open Canvas in Browser, choose Export graph to save a Capture and settingsAfter 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. Choose Model creation → Python function in model setup to reuse an existing model builder or return the selected component from a pipeline. Modules can remain in their original files. The factory must return the selected class. See input setup guide. Saving changed model code or a tracked Python dependency automatically validates
the open model by default, using its saved inputs, device and environment. Set
Execution caching is on by default for eligible identical CPU runs. A brief Python
safety check still runs; the model does not run again. Use Run fresh to execute
it again, or set
All 15 settings, including The selected project Python runs the model. A separate compatible tool environment runs the tensorViz service and dependency installer; changing model Python keeps that service running. 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. SupportDevelopment versions, the service minimum, and the capture minimum are in the versions table. Capture runs in the Python environment you select. Expression-level source edits need source positions that Python 3.10 does not record. 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 licenses. |