A PyTorch memory snapshot viewer alternative to https://docs.pytorch.org/memory_viz with rich features. Display large snapshots smoothly!
Tested on Windows and macOS.

venv or conda). Here we use conda:bash
conda activate basebash
pip install -r requirements.txtCompile binary
bash
cargo build --release --bin snapviewer-renderer --no-default-features
Run
-rr is for --resolution-ratio, used to deal with the rendering pattern of Apple's retina display. You probably need -rr 2.0 if you are using MacBook.
Option A: Pass the .pickle directly. Preprocessing artifacts are cached at ~/.snapviewer_cache/ and reused on subsequent runs.
bash
python gui.py --pickle snap/large.pickle --res 1200 500 -rr 2.0
Option B: Pre-process manually and pass the directory. ```bash # 1. Convert snapshot — outputs allocations.json and elements.db under the directory python convert_snap.py -i snap/large.pickle -o ./large
# 2. Run python gui.py --dir ./large --res 1200 500 -rr 2.0 ```
Warning: This software is in pre-alpha stage. Everything including snapshot format, data storing/loading logic is under frequent change.
cannot open input file 'sqlite3.lib', enable feature flag --features bundled-sqlite.$ claude mcp add SnapViewer \
-- python -m otcore.mcp_server <graph>