All models

swinir_classical_sr_x8

SwinIR's classical ×8 super-resolution network: windowed Swin attention in residual blocks, then sub-pixel upsampling.

Image classification · 248 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (26 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
156.5K
Operations
248
Framework
PyTorch
Recurrent
No
Published
ICCV Workshops (arXiv 2021)
Cited by
4,689 (as of 9 October 2026)
Authors
Jingyun Liang, Jiezhang Cao, Guolei Sun and others
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m12180
Graph hash
d3c5a8a6e5267f1e1059f69b408e176cbcb7ec012b5eefec4c8216165106093e
Skeleton hash
d959fc2e459cb0f2e1673cba0bf78b84605aea8833a3d8e039ff5b74ff1ab4e7
Architecture hash
d4db87a4928def478f167a447d0ea71c35d9229393a4e8beb24f992e9f1e6d45
Diagram SHA-256
e19f83c18e5f391b0a4bf12c05a162401c1a625c2676478faa74fb448b08aec7
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

How this diagram was made

menagerie.classics.swinir:build_swinir_classical_sr_x8: build({})

What it is

SwinIR is an image restoration model built on the Swin Transformer, offered as a strong baseline for the field. Image restoration here means recovering a high-quality image from a downscaled, noisy or compressed one. Its three parts are shallow feature extraction, deep feature extraction and high-quality image reconstruction.

The shallow module is a single convolution whose output is sent straight to the reconstruction module to preserve low-frequency information. Deep features come from a stack of residual Swin Transformer blocks (RSTB), each holding Swin Transformer layers, a convolution layer and a residual connection. A Swin Transformer layer partitions the input into non-overlapping M × M local windows and attends within each one. Long-range dependencies come from the shifted window mechanism. The convolution at the end of the deep module brings the inductive bias of convolution into the Transformer network. The same feature extraction modules serve every restoration task, while the reconstruction module changes per task.

The standard setting uses 6 RSTBs, 6 STLs per block, window size 8, 180 channels and 6 attention heads. For super-resolution the reconstruction module upsamples with a sub-pixel convolution layer. Shallow features carry mostly low frequencies, while the deep features recover lost high frequencies. Classical SR is trained with the plain L1 pixel loss. The paper notes that its ×8 results are provided separately from the main table. For classical SR, SwinIR has 11.8M parameters against 15.4 to 44.3M for state-of-the-art CNN models. Across tasks the paper reports gains of up to 0.14 to 0.45 dB over prior methods with up to 67% fewer parameters.

Key idea. A Swin-Transformer-based restoration baseline whose deep feature extractor is a stack of residual Swin Transformer blocks, each pairing several Swin Transformer layers with a residual connection.

  • SwinIR
  • swinir classical sr x8
  • image super-resolution
  • classical SR
  • x8 upscaling
  • Swin Transformer
  • RSTB
  • image restoration
  • pixel shuffle

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{liang2021swinirimagerestorationusing,
      title={SwinIR: Image Restoration Using Swin Transformer}, 
      author={Jingyun Liang and Jiezhang Cao and Guolei Sun and Kai Zhang and Luc Van Gool and Radu Timofte},
      year={2021},
      eprint={2108.10257},
      archivePrefix={arXiv},
      primaryClass={eess.IV},
      url={https://arxiv.org/abs/2108.10257}, 
}