URL of the ONNX model file.
Progress callback and AbortSignal.
The model as an ArrayBuffer with metadata.
import { loadModelFromUrl } from '@agentix-e/timesfm-web';
const { buffer } = await loadModelFromUrl(
'https://github.com/.../releases/download/timesfm-latest/timesfm-2.5.onnx',
{
onProgress: (received, total) => {
console.log(`Downloaded ${(received / 1024 / 1024).toFixed(1)} MB`);
},
},
);
// Pass buffer to the engine
engine.load(buffer);
Download a TimesFM ONNX model from a URL.
Uses the Fetch API with ReadableStream for progress tracking. The returned ArrayBuffer can be passed directly to
TimesFMWebInferenceEngine.load().