Skip to content
WKO AI

Self-hosted Swin2SR model

Swin2SR Classical 4x

The highest-detail 4x choice for clean AI images, renders, scans, and source photos without heavy compression noise.

Model specifications

Scale factor
4x
Precision
q8
Parameters
12.2M · q8
Exact size
21,622,515 bytes
Best for
Clean-source 4x fidelity
License
Apache-2.0

SHA-256

b4ad39342ee90fe3b4903a1d4152fe2d8d5fa0dcc877b69e1367a2e8ad4fc8e9

Model architecture and pretrained weights are attributed to caidas/swin2SR-classical-sr-x4-64. The ONNX conversion is hosted at Xenova/swin2SR-classical-sr-x4-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-classical-sr-x4-64',
  { dtype: 'q8' }
);
const output = await upscale(image);