LoadOptions
Defined in: packages/runntime/src/zoo/load.ts:18
Options accepted by every create
Properties
Section titled “Properties”cache?
Section titled “cache?”
optionalcache?:WeightCache
Defined in: packages/runntime/src/zoo/load.ts:20
Saves fetched bytes. The next load reads them from here, no network.
cacheId?
Section titled “cacheId?”
optionalcacheId?:string
Defined in: packages/runntime/src/zoo/load.ts:22
Cache key. Defaults to the URL’s file name; required for a RangeSource.
onBytes?
Section titled “onBytes?”
optionalonBytes?: (chunkBytes) =>void
Defined in: packages/runntime/src/zoo/load.ts:26
Called per fetched network chunk with its size in bytes.
Parameters
Section titled “Parameters”chunkBytes
Section titled “chunkBytes”number
Returns
Section titled “Returns”void
onProgress?
Section titled “onProgress?”
optionalonProgress?: (name,doneBytes,totalBytes) =>void
Defined in: packages/runntime/src/zoo/load.ts:24
Called while tensors upload: tensor name, bytes done, bytes total.
Parameters
Section titled “Parameters”string
doneBytes
Section titled “doneBytes”number
totalBytes
Section titled “totalBytes”number
Returns
Section titled “Returns”void
signal?
Section titled “signal?”
optionalsignal?:AbortSignal
Defined in: packages/runntime/src/zoo/load.ts:28
Stops the load between steps. A step already running finishes first.