Xenova HF Staff whitphx HF Staff commited on
Commit
ced171b
·
verified ·
1 Parent(s): a80e2ab

Add/update the quantized ONNX model files and README.md for Transformers.js v3 (#1)

Browse files

- Add/update the quantized ONNX model files and README.md for Transformers.js v3 (4c31f8d14b0221ed66118f746e1413208b9bd4ff)
- Edit README.md (394a89792fb8acffeb27905238baf9d288eab174)


Co-authored-by: Yuichiro Tachibana <[email protected]>

README.md CHANGED
@@ -7,18 +7,18 @@ https://huggingface.co/caidas/swin2SR-classical-sr-x2-64 with ONNX weights to be
7
 
8
  ## Usage (Transformers.js)
9
 
10
- If you haven't already, you can install the [Transformers.js](https://huggingface.co/docs/transformers.js) JavaScript library from [NPM](https://www.npmjs.com/package/@xenova/transformers) using:
11
  ```bash
12
- npm i @xenova/transformers
13
  ```
14
 
15
  **Example:** Upscale an image with `Xenova/swin2SR-classical-sr-x2-64`.
16
  ```js
17
- import { pipeline } from '@xenova/transformers';
18
 
19
  // Create image-to-image pipeline
20
  const upscaler = await pipeline('image-to-image', 'Xenova/swin2SR-classical-sr-x2-64', {
21
- // quantized: false, // Uncomment this line to use the quantized version
22
  });
23
 
24
  // Upscale an image
 
7
 
8
  ## Usage (Transformers.js)
9
 
10
+ If you haven't already, you can install the [Transformers.js](https://huggingface.co/docs/transformers.js) JavaScript library from [NPM](https://www.npmjs.com/package/@huggingface/transformers) using:
11
  ```bash
12
+ npm i @huggingface/transformers
13
  ```
14
 
15
  **Example:** Upscale an image with `Xenova/swin2SR-classical-sr-x2-64`.
16
  ```js
17
+ import { pipeline } from '@huggingface/transformers';
18
 
19
  // Create image-to-image pipeline
20
  const upscaler = await pipeline('image-to-image', 'Xenova/swin2SR-classical-sr-x2-64', {
21
+ dtype: 'fp32', // Change this line to use the quantized version
22
  });
23
 
24
  // Upscale an image
onnx/model_bnb4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:48ee24a93cc2b1e68b002cd6a585d06e2a550366513acf988c851a73f29ba1e6
3
+ size 22222667
onnx/model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:55531d8ef6424fff8a95af1c1fd8b4513bb82fe540ef953d82584550a32114e3
3
+ size 23192795
onnx/model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:49ffa7b96532edb9553c74be11b623dafa26db1645611096a208449451a960df
3
+ size 15612018
onnx/model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f27454f3d33deadccef00a0edc75858c2da6deed4f7516ada11237dd10bce2df
3
+ size 19032145