Skip to content
WKO AI

Self-hosted Swin2SR model

Swin2SR Lightweight 2x

A featherweight SwinV2 model that doubles resolution quickly and keeps the full fp32 weights for maximum fidelity at this size.

Model specifications

Scale factor
2x
Precision
fp32
Parameters
1.01M · fp32
Exact size
8,078,888 bytes
Best for
Speed on any device
License
Apache-2.0

SHA-256

c2abbfe0cc8e685b5e11964970f8ebe3d24072e904fd5545a30ac31ec1e110db

Model architecture and pretrained weights are attributed to caidas/swin2SR-lightweight-x2-64. The ONNX conversion is hosted at Xenova/swin2SR-lightweight-x2-64. Distributed under the Apache-2.0 license.

Use the self-hosted file

This is the same same-origin asset requested by WKO AI's studio. Remote model fallback is disabled, so a missing mirror fails explicitly.

import { env, pipeline } from '@huggingface/transformers';

env.allowLocalModels = true;
env.allowRemoteModels = false;
env.localModelPath = '/models/';

const upscale = await pipeline(
  'image-to-image',
  'Xenova/swin2SR-lightweight-x2-64',
  { dtype: 'fp32' }
);
const output = await upscale(image);