Demo.CodeSamplez
Transformers.js v3
Swin2SR 2x Model
100% Client-Side

AI Image Upscaler (2x)

Enhance and super-resolve your photos directly in your browser using the Swin2SR Swin Transformer model. Faster with WebGPU, fully private with zero server uploads.

Inference & Model Settings
Client-Side

Runs shaders directly on your GPU for peak super-resolution speed.

Fastest download & inference with minimal quality trade-off (Recommended)

Drag and drop your image here

or click to browse from your device

PNG
JPG / JPEG
WebP
Up to 10 MB

Or try with a sample image:

How In-Browser Super-Resolution Works

Experience machine learning running natively in modern web browsers without APIs or third-party servers.

1
Select or Upload an Image

Drag & drop a PNG, JPG, or WebP photo into the browser, or choose one of our sample images to get started immediately.

2
Local Onnx AI Inference

Transformers.js loads the Swin2SR super-resolution ONNX model right in your browser cache. The model processes the image tiles locally using WebGPU shaders or WASM.

3
Inspect & Download 2x Result

Slide the interactive Before / After divider to compare details, inspect the edge restoration, and download the full-resolution upscaled image.

Features & Capabilities

Built with modern web standards for high performance, portability, and privacy.

100% Private & In-Browser

Your images never leave your device. All super-resolution computation runs locally using client-side AI.

WebGPU Acceleration

Harness the power of your GPU via WebGPU shaders for rapid 2x super-resolution with automatic WASM fallback.

Swin2SR Transformer AI

Powered by Swin Transformer architecture with shifted-window self-attention to recover crisp edges and textures.

Interactive Split Inspection

Compare original and upscaled images with a draggable split-view slider and zoom magnification.

Multiple Formats & Quantization

Works with JPG, PNG, and WebP. Choose between 4-bit (q4), 8-bit quantized, fp16, and fp32 precision.

Free & Open Source

No subscription, no API key, and no usage caps. Powered by Hugging Face Transformers.js ONNX runtime.

Frequently Asked Questions


Swin2SR (Swin Transformer for Image Super-Resolution) uses shifted window self-attention mechanisms to restore high-frequency textures, sharp edges, and fine details lost during compression or downsampling. It models long-range image dependencies to accurately reconstruct a 2x higher resolution version of the input.


No! Everything runs 100% locally on your computer inside your web browser. Your images never leave your machine, ensuring total privacy and security.


WebGPU is the modern web standard that allows browser applications to access your device's graphics processing unit (GPU) for parallel computations. With WebGPU, image super-resolution runs up to 10x faster than CPU-only execution.


If WebGPU is unavailable, the tool seamlessly falls back to WebAssembly (WASM) running multithreaded CPU inference so you can still upscale images on any modern browser.


For best browser performance and quick inference times, input images between 128x128 and 512x512 pixels are ideal. Larger images will also upscale smoothly, though they will take longer to compute.


You can export your 2x upscaled results as lossless PNG images or compressed JPEG files directly with a single click.

You might also like

Explore more interactive tools and demos.

Image Object Identifier

Image Object Identifier

Identify objects in images using AI vision models with bounding boxes.