whitphx HF Staff commited on
Commit
7d683de
·
verified ·
1 Parent(s): 70bfbf9

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

Browse files

## Applied Quantizations

### ❌ Based on `model.onnx` *with* slimming

```
0%| | 0/1 [00:00<?, ?it/s]
Processing /tmp/tmpjajl2j8i/model.onnx: 0%| | 0/1 [00:00<?, ?it/s]

0%| | 0/1 [00:00<?, ?it/s]

- Quantizing to q4f16: 0%| | 0/1 [00:00<?, ?it/s]2025-07-07 02:20:43,103 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Shape ...
2025-07-07 02:20:43,103 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Gather ...
2025-07-07 02:20:43,103 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Gather_1 ...
2025-07-07 02:20:43,103 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Mod ...
2025-07-07 02:20:43,103 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Mod_2 ...
2025-07-07 02:20:43,103 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Mul_186 ...
2025-07-07 02:20:43,103 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Mul_187 ...
2025-07-07 02:20:43,103 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Sub ...
2025-07-07 02:20:43,103 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Sub_1 ...
2025-07-07 02:20:43,103 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Unsqueeze_191 ...
2025-07-07 02:20:43,103 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Unsqueeze_192 ...
2025-07-07 02:20:43,103 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Mod_1 ...
2025-07-07 02:20:43,103 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Mod_3 ...
2025-07-07 02:20:43,103 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Unsqueeze_2 ...
2025-07-07 02:20:43,103 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Unsqueeze_3 ...
2025-07-07 02:20:43,103 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Concat_1 ...
2025-07-07 02:20:43,103 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Concat_2 ...
2025-07-07 02:20:43,103 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Reshape ...
2025-07-07 02:20:43,103 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Slice ...
2025-07-07 02:20:43,103 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Transpose ...
2025-07-07 02:20:43,103 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Reshape_1 ...
2025-07-07 02:20:43,103 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Pad ...
2025-07-07 02:20:43,103 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Sub_3 ...
2025-07-07 02:20:43,103 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /conv_first/Conv ...
2025-07-07 02:20:43,103 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Shape_3 ...
2025-07-07 02:20:43,103 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Gather_3 ...
2025-07-07 02:20:43,103 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Gather_4 ...
2025-07-07 02:20:43,103 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Slice_1 ...
2025-07-07 02:20:43,103 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Concat_3 ...
2025-07-07 02:20:43,104 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Unsqueeze_142 ...
2025-07-07 02:20:43,104 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Unsqueeze_143 ...
2025-07-07 02:20:43,104 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /layers.0/blocks.0/attn/anchor/body.0/Div ...
2025-07-07 02:20:43,104 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /layers.0/blocks.0/attn/anchor/body.0/Div_1 ...
2025-07-07 02:20:43,104 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /layers.0/blocks.0/attn/window_attn/Mul_1 ...
2025-07-07 02:20:43,104 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /layers.0/blocks.0/attn/window_attn/Div_8 ...
2025-07-07 02:20:43,104 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /layers.0/blocks.0/attn/window_attn/Div_9 ...
2025-07-07 02:20:43,104 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Reshape_2 ...
2025-07-07 02:20:43,104 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Concat_80 ...
2025-07-07 02:20:43,104 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /layers.0/blocks.0/attn/window_attn/Cast_6 ...
2025-07-07 02:20:43,104 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /layers.0/blocks.0/attn/stripe_attn/Unsqueeze_31 ...
2025-07-07 02:20:43,104 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /layers.0/blocks.0/attn/anchor/body.0/Unsqueeze_5 ...
2025-07-07 02:20:43,104 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /layers.0/blocks.0/attn/anchor/body.0/Unsqueeze_6 ...
2025-07-07 02:20:43,104 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /layers.0/blocks.0/attn/window_attn/Unsqueeze_16 ...
2025-07-07 02:20:43,104 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /layers.0/blocks.0/attn/window_attn/Unsqueeze_17 ...
2025-07-07 02:20:43,104 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Transpose_1 ...
2025-07-07 02:20:43,104 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /ConstantOfShape_139 ...
2025-07-07 02:20:43,104 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /layers.0/blocks.0/attn/window_attn/Div_5 ...
2025-07-07 02:20:43,104 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /norm_start/ReduceMean ...
2025-07-07 02:20:43,104 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Shape_77 ...
2025-07-07 02:20:43,104 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /layers.0/blocks.0/attn/window_attn/Div_6 ...
2025-07-07 02:20:43,104 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Slice_36 ...
2025-07-07 02:20:43,104 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /norm_start/Sub ...
2025-07-07 02:20:43,104 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Gather_40 ...
2025-07-07 02:20:43,104 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Gather_41 ...
2025-07-07 02:20:43,104 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Shape_74 ...
2025-07-07 02:20:43,104 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /norm_start/Pow ...
2025-07-07 02:20:43,104 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /ConstantOfShape_140 ...
2025-07-07 02:20:43,104 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Range_1 ...
2025-07-07 02:20:43,104 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Range_2 ...
2025-07-07 02:20:43,104 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /norm_start/ReduceMean_1 ...
2025-07-07 02:20:43,104 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Expand_180 ...
2025-07-07 02:20:43,104 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Slice_38 ...
2025-07-07 02:20:43,104 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Slice_39 ...
2025-07-07 02:20:43,104 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /norm_start/Add ...
2025-07-07 02:20:43,104 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Reshape_46 ...
2025-07-07 02:20:43,104 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Reshape_47 ...
2025-07-07 02:20:43,105 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /norm_start/Sqrt ...
2025-07-07 02:20:43,105 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Add_8 ...
2025-07-07 02:20:43,105 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /norm_start/Div ...
2025-07-07 02:20:43,105 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Add_9 ...
2025-07-07 02:20:43,105 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /norm_start/Mul ...
2025-07-07 02:20:43,105 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Shape_80 ...
2025-07-07 02:20:43,105 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /norm_start/Add_1 ...
2025-07-07 02:20:43,105 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Equal_138 ...
2025-07-07 02:20:43,105 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - start to quantize /layers.0/blocks.0/attn/qkv/body/MatMul ...
2025-07-07 02:20:43,109 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - complete quantization of /layers.0/blocks.0/attn/qkv/body/MatMul ...
2025-07-07 02:20:43,109 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /layers.0/blocks.0/attn/anchor/body.0/Shape ...
2025-07-07 02:20:43,109 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /layers.0/blocks.0/attn/anchor/body.0/Transpose ...
2025-07-07 02:20:43,109 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /Where_138 ...
2025-07-07 02:20:43,109 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /layers.0/blocks.0/attn/qkv/body/Add ...
2025-07-07 02:20:43,109 onnxruntime.quantization.matmul_4bits_quantizer [INFO] - skip to quantize /layers.0/blocks.0/attn/anchor/body.0/Gather ...
2025-07-07 02:20:43,109 onnxruntime.q

Files changed (2) hide show
  1. README.md +4 -4
  2. onnx/model_q4f16.onnx +3 -0
README.md CHANGED
@@ -12,18 +12,18 @@ https://github.com/Kiteretsu77/APISR with ONNX weights to be compatible with Tra
12
 
13
  ## Usage (Transformers.js)
14
 
15
- 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:
16
  ```bash
17
- npm i @xenova/transformers
18
  ```
19
 
20
  **Example:** Upscale an image with `Xenova/4x_APISR_GRL_GAN_generator-onnx`.
21
  ```js
22
- import { pipeline } from '@xenova/transformers';
23
 
24
  // Create image-to-image pipeline
25
  const upscaler = await pipeline('image-to-image', 'Xenova/4x_APISR_GRL_GAN_generator-onnx', {
26
- quantized: false,
27
  });
28
 
29
  // Upscale an image
 
12
 
13
  ## Usage (Transformers.js)
14
 
15
+ 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:
16
  ```bash
17
+ npm i @huggingface/transformers
18
  ```
19
 
20
  **Example:** Upscale an image with `Xenova/4x_APISR_GRL_GAN_generator-onnx`.
21
  ```js
22
+ import { pipeline } from '@huggingface/transformers';
23
 
24
  // Create image-to-image pipeline
25
  const upscaler = await pipeline('image-to-image', 'Xenova/4x_APISR_GRL_GAN_generator-onnx', {
26
+ dtype: "fp32",
27
  });
28
 
29
  // Upscale an image
onnx/model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1a04f6ed3184a57769c41d186f17bb1e311445ddf12f85af3e2c89089e88ee7f
3
+ size 4689466