Colab and Kaggle¶
The quick-start notebook runs unchanged on both platforms:
It downloads a real Sentinel-2 scene, super-resolves it, and walks through crop monitoring, urban analysis and flood / landslide change detection.
Google Colab¶
- Open the notebook with the badge above.
- Runtime → Change runtime type → T4 GPU (optional; the CPU runtime works too, more slowly).
-
Run the first cell:
No restart is needed. Colab already ships PyTorch and Triton. 4. Check the environment:
import sys !{sys.executable} -m synapse_sr --env # works in any Jupyter; the shorter `!synapse-sr --env` on Colab and KaggleOn a GPU runtime
pro_scan_backendreadstriton. Triton compiles its kernel once per session, which takes a few seconds on the first scene.
Kaggle¶
- Open the notebook with the badge above, or Create → New notebook → File → Import notebook and paste the
GitHub URL of
notebooks/quickstart.ipynb. - In the right-hand panel: Session options → Accelerator → GPU T4 x2 or P100, and Internet → On. Internet
access is needed for the one-time weight download and for
fetch_sentinel2. - Run the cells in order.
Without internet on Kaggle
Add the weights as a Kaggle dataset: download synapse-pro-v2.safetensors from
Hugging Face and upload it. Then load it with
Pro.from_pretrained(weights="/kaggle/input/<dataset>/synapse-pro-v2.safetensors"). No network access is
needed after that.
Using your own files¶
Speed and memory¶
| Runtime | Model | Notes |
|---|---|---|
| Colab / Kaggle GPU | Pro | Triton scan kernel; the default of 8 tiles per batch fits a T4 (16 GB) |
| Colab / Kaggle CPU | Flash (default) | works well: on Kaggle's free 2-core CPU runtime the whole quick-start notebook (install, three scene downloads, three super-resolutions, all plots) finishes in about 3 minutes |
If the GPU runs out of memory, lower batch (tiles per forward pass) or tile: