()
| 195 | } |
| 196 | |
| 197 | private async loadStream(): Promise<ModelArtifacts> { |
| 198 | const modelJSON = await this.loadModelJSON(); |
| 199 | const fetchURLs = await this.getWeightUrls(modelJSON.weightsManifest); |
| 200 | const weightSpecs = getWeightSpecs(modelJSON.weightsManifest); |
| 201 | const stream = () => streamWeights(fetchURLs, this.loadOptions); |
| 202 | |
| 203 | return { |
| 204 | ...modelJSON, |
| 205 | weightSpecs, |
| 206 | getWeightStream: stream, |
| 207 | }; |
| 208 | } |
| 209 | |
| 210 | private async getWeightUrls(weightsManifest: WeightsManifestConfig): |
| 211 | Promise<string[]> { |
no test coverage detected