A model is still running

A model is still running or downloading. Leaving will stop the current operation. Stay on this page to let it finish.

Skip to content
LocalAI.toolsBeta

Join the waitlist

Get an email when the new apps and model runs launch.

No account needed.

Swin2SR Real-World 4× Super-Resolution

Enlarge an RGB image to four times its width and height while reducing common blur and compression artifacts. Returns the enlarged image pixels; it cannot recover guaranteed true detail missing from the original.

Browser inferencePowered by WebAI · Private · Unlimited runs
About this model

Enlarge an RGB image to four times its width and height while reducing common blur and compression artifacts. Returns the enlarged image pixels; it cannot recover guaranteed true detail missing from the original.

License
Apache-2.0
Model released
Unknown
Source repository created
Dec 16, 2022
Model weights · Q4
23.0 MB

Best for

  • Enhancing low-resolution photographs for user-reviewed display.
  • Prototyping browser image restoration and 4× upscaling.
  • Benchmarking ONNX super-resolution backends in browsers.

Keep in mind

  • The model can hallucinate or alter fine details and must not be used to recover evidentiary, medical, identity, or safety-critical information.
  • Faces, text, repeated patterns, heavy blur, unusual noise, and out-of-distribution images can produce incorrect or artificial details.
  • Output is always 4× the decoded input dimensions, increasing memory use by about 16× for pixels.
  • Quality depends on how closely the degradation resembles BSRGAN training data; clean bicubic inputs are not guaranteed to improve by every fidelity metric.

Processed on your deviceInference runs in this browser. Input/output sharing requires consent for each run. Basic run logs include device information and approximate connection location. Model and runtime files download from external hosts. Saved downloads may be cleared by your browser.

Sources & technical details
Original model
caidas/swin2SR-realworld-sr-x4-64-bsrgan-psnr
Release verification
Unknown
Release evidence
Exact original checkpoint public release date has not been verified. Repository creation, training, paper, artifact conversion and update dates are not release evidence.
Source updated
Jan 21, 2023
Browser model files
Xenova/swin2SR-realworld-sr-x4-64-bsrgan-psnr
Files updated
Sep 30, 2025
Artifact revision
d0e9926970c93e472ce2392373d72597fc849027

Input

IMAGE

Sample result

Swin2SR Real-World 4× Super-Resolution

Settings

Adds a self-contained SVG presentation image alongside the unchanged native model fields. When enabled, draws model predictions or presents generated media and text. Adds CPU postprocessing time and image bytes. It does not change model predictions.

Output

Your result will appear here

Add input or try the sample, then run the model.

Benchmark evidence

Saved worker evidence is separate from benchmarks run on your device. It does not guarantee speed or quality on every browser.

Swin2SR Real-World 4× Super-Resolution

14 configurations tested
Passed10
Failed4
TestedOct 23, 2026
RuntimeTransformers.js 4.2.0

Quality criteria

Output must be finite, non-flat 384×384 RGB; PSNR against the checked-in real-photo reference must be at least 18 dB.

PrecisionDeviceResult
Q4GPU · WebGPUAcceleratedPassedFast
FP32GPU · WebGPUAcceleratedPassedFast
BNB4GPU · WebGPUAcceleratedPassedSlow
Q8GPU · WebGPUAcceleratedPassedVery slow
UINT8GPU · WebGPUAcceleratedPassedVery slow
Q8CPU · WASMPassedVery slow
BNB4CPU · WASMPassedVery slow
FP32CPU · WASMPassedVery slow
UINT8CPU · WASMPassedVery slow
Q4CPU · WASMPassedVery slow
FP16CPU · WASMFailed—
FP16GPU · WebGPUFailed—
Q4F16CPU · WASMFailed—
Q4F16GPU · WebGPUFailed—
Test setup & sample details
Quality gate
Output must be finite, non-flat 384×384 RGB; PSNR against the checked-in real-photo reference must be at least 18 dB.
Tested
2026-10-23T11:27:48.607Z
Environment
Isolated headless Google Chrome on macOS; Transformers.js 4.2.0
Runtime
Transformers.js 4.2.0
Artifact revision
d0e9926970c93e472ce2392373d72597fc849027
Fixture
{
  "file": "swin2sr-portrait-lowres.jpg",
  "url": "https://f005.backblazeb2.com/file/hubters-webai-public/assets/benchmarks/swin2sr-portrait-lowres.jpg",
  "size": 5059,
  "sha1": "86b8839b760031cca032e78fe516dc5bda417a1a",
  "width": 96,
  "height": 96,
  "source": "https://www.pexels.com/photo/woman-wearing-pink-turtleneck-sweater-5965592/",
  "license": "Pexels License",
  "licenseUrl": "https://www.pexels.com/license/",
  "preprocessing": "Center-crop the 1024×683 source to a square, resize to 384×384, then downsample to 96×96 with macOS sips.",
  "expected": {
    "file": "swin2sr-portrait-reference.jpg",
    "url": "https://f005.backblazeb2.com/file/hubters-webai-public/assets/benchmarks/swin2sr-portrait-reference.jpg",
    "size": 38541,
    "sha1": "5eac874a7468aa600d6fd805aff177e411362de6",
    "width": 384,
    "height": 384
  }
}
Rerun when
artifact revision change; runtime version change; fixture or quality-gate change; browser/backend behavior change
Per-case quality & failure details
[
  {
    "precision": "fp32",
    "device": "wasm",
    "status": "pass",
    "quality": {
      "psnrDb": 27.12,
      "grade": "excellent"
    },
    "runtime": {
      "loadMs": 11523.2,
      "inferenceMs": 6849.6,
      "totalMs": 19818.3,
      "imagesPerSecond": 0.146,
      "grade": "very-slow"
    }
  },
  {
    "precision": "fp32",
    "device": "webgpu",
    "status": "pass",
    "quality": {
      "psnrDb": 27.12,
      "grade": "excellent"
    },
    "runtime": {
      "loadMs": 12121.7,
      "inferenceMs": 397.7,
      "totalMs": 13840.9,
      "imagesPerSecond": 2.514,
      "grade": "good"
    }
  },
  {
    "precision": "fp16",
    "device": "wasm",
    "status": "fail",
    "quality": "Not embedded",
    "runtime": {
      "loadMs": null,
      "inferenceMs": null,
      "totalMs": 11975.5,
      "grade": "failed"
    },
    "failure": "onnx-session-error"
  },
  {
    "precision": "fp16",
    "device": "webgpu",
    "status": "fail",
    "quality": "Not embedded",
    "runtime": {
      "loadMs": 15326.2,
      "inferenceMs": null,
      "totalMs": 17759.7,
      "grade": "failed"
    },
    "failure": "onnx-shape-mismatch"
  },
  {
    "precision": "uint8",
    "device": "wasm",
    "status": "pass",
    "quality": {
      "psnrDb": 27.16,
      "grade": "excellent"
    },
    "runtime": {
      "loadMs": 9572.6,
      "inferenceMs": 6931.5,
      "totalMs": 17882.5,
      "imagesPerSecond": 0.144,
      "grade": "very-slow"
    }
  },
  {
    "precision": "uint8",
    "device": "webgpu",
    "status": "pass",
    "quality": {
      "psnrDb": 27.15,
      "grade": "excellent"
    },
    "runtime": {
      "loadMs": 10696.8,
      "inferenceMs": 6415.9,
      "totalMs": 18434.4,
      "imagesPerSecond": 0.156,
      "grade": "very-slow"
    }
  },
  {
    "precision": "q8",
    "device": "wasm",
    "status": "pass",
    "quality": {
      "psnrDb": 26.99,
      "grade": "excellent"
    },
    "runtime": {
      "loadMs": 15775.6,
      "inferenceMs": 6763.4,
      "totalMs": 24122.2,
      "imagesPerSecond": 0.148,
      "grade": "very-slow"
    }
  },
  {
    "precision": "q8",
    "device": "webgpu",
    "status": "pass",
    "quality": {
      "psnrDb": 26.99,
      "grade": "excellent"
    },
    "runtime": {
      "loadMs": 15365.2,
      "inferenceMs": 6206.4,
      "totalMs": 23047.8,
      "imagesPerSecond": 0.161,
      "grade": "very-slow"
    }
  },
  {
    "precision": "q4",
    "device": "wasm",
    "status": "pass",
    "quality": {
      "psnrDb": 27.14,
      "grade": "excellent"
    },
    "runtime": {
      "loadMs": 9977,
      "inferenceMs": 6993.2,
      "totalMs": 18393.4,
      "imagesPerSecond": 0.143,
      "grade": "very-slow"
    }
  },
  {
    "precision": "q4",
    "device": "webgpu",
    "status": "pass",
    "quality": {
      "psnrDb": 27.14,
      "grade": "excellent"
    },
    "runtime": {
      "loadMs": 9797.6,
      "inferenceMs": 372.1,
      "totalMs": 11544.2,
      "imagesPerSecond": 2.687,
      "grade": "good"
    }
  },
  {
    "precision": "q4f16",
    "device": "wasm",
    "status": "fail",
    "quality": "Not embedded",
    "runtime": {
      "loadMs": null,
      "inferenceMs": null,
      "totalMs": 9167.1,
      "grade": "failed"
    },
    "failure": "onnx-session-error"
  },
  {
    "precision": "q4f16",
    "device": "webgpu",
    "status": "fail",
    "quality": {
      "psnrDb": 11.06,
      "grade": "failed"
    },
    "runtime": {
      "loadMs": 9297.8,
      "inferenceMs": 578.2,
      "totalMs": 11193.8,
      "imagesPerSecond": 1.73,
      "grade": "good"
    },
    "failure": "quality-psnr"
  },
  {
    "precision": "bnb4",
    "device": "wasm",
    "status": "pass",
    "quality": {
      "psnrDb": 27.24,
      "grade": "excellent"
    },
    "runtime": {
      "loadMs": 9033,
      "inferenceMs": 6819.9,
      "totalMs": 17391.6,
      "imagesPerSecond": 0.147,
      "grade": "very-slow"
    }
  },
  {
    "precision": "bnb4",
    "device": "webgpu",
    "status": "pass",
    "quality": {
      "psnrDb": 27.24,
      "grade": "excellent"
    },
    "runtime": {
      "loadMs": 10378.1,
      "inferenceMs": 4919.4,
      "totalMs": 16723.3,
      "imagesPerSecond": 0.203,
      "grade": "slow"
    }
  }
]

Something not quite right?

Tell us what happened with Swin2SR. Loading, results, or the page itself—we’re here for all of it.

Attachments Optional

Up to 3 files · 50 MB each

Browser, OS, CPU/GPU, memory, screen, storage, and network details are included automatically. Model inputs, results, and browsing history are not collected.