A simple safetensor library for the web, caches to IndexDB to avoid re-downloading the same files.
import { loadSafeTensor } from "safetensors";
const tensor = await loadSafeTensor("...");
const convStemTensor = tensor.getTensor("_conv_stem");
Via the network tab the net.tensors
file is only fetched once.