Instructions to use Xenova/tiny-random-Swin2SRModel with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use Xenova/tiny-random-Swin2SRModel with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('image-feature-extraction', 'Xenova/tiny-random-Swin2SRModel');
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 (fc0b258c62401b9d0441d6a57030b7a29eb13c27)
Co-authored-by: Yuichiro Tachibana <whitphx@users.noreply.huggingface.co>
Files changed (5)
- README.md+17
- onnx/model_bnb4.onnxAdded+3
- onnx/model_q4.onnxAdded+3
- onnx/model_q4f16.onnxAdded+3
- onnx/model_uint8.onnxAdded+3
4 unmodified lines56784 unmodified lineshttps://huggingface.co/hf-tiny-model-private/tiny-random-Swin2SRModel with ONNX weights to be compatible with Transformers.js.Note: Having a separate repo for ONNX weights is intended to be a temporary solution until WebML gains more traction. If you would like to make your models web-ready, we recommend converting to ONNX using [🤗 Optimum](https://huggingface.co/docs/optimum/index) and structuring your repo like this one (with ONNX weights located in a subfolder named `onnx`).4 unmodified lines56789101112131415161718192021222324254 unmodified lineshttps://huggingface.co/hf-tiny-model-private/tiny-random-Swin2SRModel with ONNX weights to be compatible with Transformers.js.## Usage (Transformers.js)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:```bashnpm i @huggingface/transformers```**Example:** Perform image feature extraction.```jsimport { pipeline } from '@huggingface/transformers';const image_feature_extractor = await pipeline('image-feature-extraction', 'Xenova/tiny-random-Swin2SRModel');const url = 'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/cats.png';const features = await image_feature_extractor(url);```Note: Having a separate repo for ONNX weights is intended to be a temporary solution until WebML gains more traction. If you would like to make your models web-ready, we recommend converting to ONNX using [🤗 Optimum](https://huggingface.co/docs/optimum/index) and structuring your repo like this one (with ONNX weights located in a subfolder named `onnx`).
123version https://git-lfs.github.com/spec/v1oid sha256:55b37f22ab259382b7190887df0a1bc871a5b02de3579e3a26e93299aa4d77d5size 274446123version https://git-lfs.github.com/spec/v1oid sha256:f9a6a46444f6d7012c3ac85927abd9045a1c9c82f5b249485cb0d85bfbd9563bsize 278614123version https://git-lfs.github.com/spec/v1oid sha256:b560e06726dae352e12a631ea612a04308d44e9085613a31435c6dd345f34ba2size 256148123version https://git-lfs.github.com/spec/v1oid sha256:c13d47bfe38920c600c1f4199ccaea13158bac768da0d740d446e9b9a5c6c968size 288118README.md+17
onnx/model_bnb4.onnxAdded+3
onnx/model_q4.onnxAdded+3
onnx/model_q4f16.onnxAdded+3
onnx/model_uint8.onnxAdded+3