Skip to content

Class: CombinedModelDownloader

Constructors

new CombinedModelDownloader()

ts
new CombinedModelDownloader(downloaders: ModelDownloader[], options?: CombinedModelDownloaderOptions): CombinedModelDownloader

When combining ModelDownloader instances, the following options on each individual ModelDownloader are ignored:

  • showCliProgress
  • onProgress
  • parallelDownloads

To set any of those options for the combined downloader, you have to pass them to the combined downloader instance

Parameters

ParameterType
downloadersModelDownloader[]
options?CombinedModelDownloaderOptions

Returns

CombinedModelDownloader

Defined in

utils/createModelDownloader.ts:475

Accessors

modelDownloaders

ts
get modelDownloaders(): readonly ModelDownloader[]

Returns

readonly ModelDownloader[]

Defined in

utils/createModelDownloader.ts:546


entrypointFilenames

ts
get entrypointFilenames(): string[]

The filename of the entrypoint files that should be used to load the models.

Returns

string[]

Defined in

utils/createModelDownloader.ts:553


entrypointFilePaths

ts
get entrypointFilePaths(): string[]

The full paths to the entrypoint files that should be used to load the models.

Returns

string[]

Defined in

utils/createModelDownloader.ts:560


totalFiles

ts
get totalFiles(): number

The accumulation of totalFiles of all the model downloaders

Returns

number

Defined in

utils/createModelDownloader.ts:567


totalSize

ts
get totalSize(): number

Returns

number

Defined in

utils/createModelDownloader.ts:573


downloadedSize

ts
get downloadedSize(): number

Returns

number

Defined in

utils/createModelDownloader.ts:579

Methods

cancel()

ts
cancel(): Promise<void>

Returns

Promise<void>

Defined in

utils/createModelDownloader.ts:490


download()

ts
download(__namedParameters: {
  signal: AbortSignal;
 }): Promise<string[]>

Parameters

ParameterType
__namedParametersobject
__namedParameters.signal?AbortSignal

Returns

Promise<string[]>

The paths to the entrypoint files that should be used to load the models

Defined in

utils/createModelDownloader.ts:509