Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove old import from stream/web for ReadableStream #752

Merged
merged 1 commit into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@
"path": false,
"url": false,
"sharp": false,
"onnxruntime-node": false,
"stream/web": false
"onnxruntime-node": false
},
"publishConfig": {
"access": "public"
Expand Down
6 changes: 0 additions & 6 deletions src/utils/hub.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,10 @@

import fs from 'fs';
import path from 'path';
import stream from 'stream/web';

import { env } from '../env.js';
import { dispatchCallback } from './core.js';

if (!globalThis.ReadableStream) {
// @ts-ignore
globalThis.ReadableStream = stream.ReadableStream; // ReadableStream is not a global with Node 16
}

/**
* @typedef {Object} PretrainedOptions Options for loading a pretrained model.
* @property {boolean?} [quantized=true] Whether to load the 8-bit quantized version of the model (only applicable when loading model files).
Expand Down
Loading