From 7ab96a1f0ee2ddacd219769050da10a390031708 Mon Sep 17 00:00:00 2001 From: Joshua Lochner Date: Wed, 15 Jan 2025 15:22:52 +0000 Subject: [PATCH] hotfix: Copy missing ort-wasm-simd-threaded.jsep.mjs to dist folder --- README.md | 4 ++-- docs/snippets/2_installation.snippet | 2 +- docs/snippets/4_custom-usage.snippet | 2 +- package-lock.json | 12 ++++++------ package.json | 6 +++--- src/env.js | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index a6692427a..2f19fb915 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ npm i @huggingface/transformers Alternatively, you can use it in vanilla JS, without any bundler, by using a CDN or static hosting. For example, using [ES Modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules), you can import the library with: ```html ``` @@ -155,7 +155,7 @@ Check out the Transformers.js [template](https://huggingface.co/new-space?templa -By default, Transformers.js uses [hosted pretrained models](https://huggingface.co/models?library=transformers.js) and [precompiled WASM binaries](https://cdn.jsdelivr.net/npm/@huggingface/transformers@3.3.0/dist/), which should work out-of-the-box. You can customize this as follows: +By default, Transformers.js uses [hosted pretrained models](https://huggingface.co/models?library=transformers.js) and [precompiled WASM binaries](https://cdn.jsdelivr.net/npm/@huggingface/transformers@3.3.1/dist/), which should work out-of-the-box. You can customize this as follows: ### Settings diff --git a/docs/snippets/2_installation.snippet b/docs/snippets/2_installation.snippet index 8b3096857..fd9e56d8f 100644 --- a/docs/snippets/2_installation.snippet +++ b/docs/snippets/2_installation.snippet @@ -7,6 +7,6 @@ npm i @huggingface/transformers Alternatively, you can use it in vanilla JS, without any bundler, by using a CDN or static hosting. For example, using [ES Modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules), you can import the library with: ```html ``` diff --git a/docs/snippets/4_custom-usage.snippet b/docs/snippets/4_custom-usage.snippet index 7af5b390f..458faa282 100644 --- a/docs/snippets/4_custom-usage.snippet +++ b/docs/snippets/4_custom-usage.snippet @@ -1,6 +1,6 @@ -By default, Transformers.js uses [hosted pretrained models](https://huggingface.co/models?library=transformers.js) and [precompiled WASM binaries](https://cdn.jsdelivr.net/npm/@huggingface/transformers@3.3.0/dist/), which should work out-of-the-box. You can customize this as follows: +By default, Transformers.js uses [hosted pretrained models](https://huggingface.co/models?library=transformers.js) and [precompiled WASM binaries](https://cdn.jsdelivr.net/npm/@huggingface/transformers@3.3.1/dist/), which should work out-of-the-box. You can customize this as follows: ### Settings diff --git a/package-lock.json b/package-lock.json index 349c06df1..76f3368de 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,17 @@ { "name": "@huggingface/transformers", - "version": "3.3.0", + "version": "3.3.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@huggingface/transformers", - "version": "3.3.0", + "version": "3.3.1", "license": "Apache-2.0", "dependencies": { "@huggingface/jinja": "^0.3.2", "onnxruntime-node": "1.20.1", - "onnxruntime-web": "1.21.0-dev.20250111-73f5b0c597", + "onnxruntime-web": "1.21.0-dev.20250114-228dd16893", "sharp": "^0.33.5" }, "devDependencies": { @@ -8782,9 +8782,9 @@ } }, "node_modules/onnxruntime-web": { - "version": "1.21.0-dev.20250111-73f5b0c597", - "resolved": "https://registry.npmjs.org/onnxruntime-web/-/onnxruntime-web-1.21.0-dev.20250111-73f5b0c597.tgz", - "integrity": "sha512-xk0FmmsJg9uFm38POs2ACtwXCyzivWnMyyXJ7/hlWFFAJC0/DiSl4saHAYTApXXye3RZuoqD3LfnLxaLl9AldQ==", + "version": "1.21.0-dev.20250114-228dd16893", + "resolved": "https://registry.npmjs.org/onnxruntime-web/-/onnxruntime-web-1.21.0-dev.20250114-228dd16893.tgz", + "integrity": "sha512-fUnedxS63NYwNkQJlvdD55jVcOtyM+Qzw1SGt9Pj3jZVaIwR4mltx/5C0yvwdue44BTSV7M5Q0qnhL6/30ewqA==", "license": "MIT", "dependencies": { "flatbuffers": "^1.12.0", diff --git a/package.json b/package.json index fff755a1b..4aad5f2f0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@huggingface/transformers", - "version": "3.3.0", + "version": "3.3.1", "description": "State-of-the-art Machine Learning for the web. Run 🤗 Transformers directly in your browser, with no need for a server!", "main": "./src/transformers.js", "types": "./types/transformers.d.ts", @@ -26,7 +26,7 @@ "format:check": "prettier --check .", "typegen": "tsc --build", "dev": "webpack serve --no-client-overlay", - "build": "webpack && npm run typegen", + "build": "webpack && npm run typegen && rm ./dist/ort.bundle.min.mjs && cp ./node_modules/onnxruntime-web/dist/ort-wasm-simd-threaded.jsep.mjs ./dist", "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js --verbose", "readme": "python ./docs/scripts/build_readme.py", "docs-api": "node ./docs/scripts/generate.js", @@ -57,7 +57,7 @@ "dependencies": { "@huggingface/jinja": "^0.3.2", "onnxruntime-node": "1.20.1", - "onnxruntime-web": "1.21.0-dev.20250111-73f5b0c597", + "onnxruntime-web": "1.21.0-dev.20250114-228dd16893", "sharp": "^0.33.5" }, "devDependencies": { diff --git a/src/env.js b/src/env.js index c7f9b43b9..5db8742ff 100644 --- a/src/env.js +++ b/src/env.js @@ -26,7 +26,7 @@ import fs from 'fs'; import path from 'path'; import url from 'url'; -const VERSION = '3.3.0'; +const VERSION = '3.3.1'; // Check if various APIs are available (depends on environment) const IS_BROWSER_ENV = typeof window !== "undefined" && typeof window.document !== "undefined";