Skip to content

LoadOptions

Defined in: packages/runntime/src/zoo/load.ts:18

Options accepted by every create() factory.

optional cache?: WeightCache

Defined in: packages/runntime/src/zoo/load.ts:20

Saves fetched bytes. The next load reads them from here, no network.


optional cacheId?: string

Defined in: packages/runntime/src/zoo/load.ts:22

Cache key. Defaults to the URL’s file name; required for a RangeSource.


optional onBytes?: (chunkBytes) => void

Defined in: packages/runntime/src/zoo/load.ts:26

Called per fetched network chunk with its size in bytes.

number

void


optional onProgress?: (name, doneBytes, totalBytes) => void

Defined in: packages/runntime/src/zoo/load.ts:24

Called while tensors upload: tensor name, bytes done, bytes total.

string

number

number

void


optional signal?: AbortSignal

Defined in: packages/runntime/src/zoo/load.ts:28

Stops the load between steps. A step already running finishes first.