Skip to content

Overview ​

SoraSR is a research-oriented machine learning toolkit for single-image super-resolution (SISR), blind restoration, and real-time upscaling pipelines. It provides reproducible PyTorch training recipes alongside deterministic export paths to ONNX Runtime and TensorRT.

Design Goals ​

Most restoration repositories optimize either for benchmark PSNR or for production throughput, leaving a wide gap between research checkpoints and deployable engines. SoraSR bridges both regimes around four core principles:

  1. Predictable Compute Envelopes — Every architectural block reports analytical FLOPs and peak activation memory for arbitrary input shapes.
  2. Modular Objective Composition — Pixel, perceptual, adversarial, and spectral losses are declared declaratively in YAML and weighted via step-based schedules.
  3. Export-First Operators — All core layers avoid dynamic Python control flow and unsupported custom ops so torch.onnx.export succeeds without graph rewrites.
  4. Reproducible Evaluation — Built-in Y-channel PSNR, SSIM, and LPIPS evaluators enforce identical border cropping and color-space conversion across runs.

Core Modules ​

PackageResponsibility
sorasr.modelsBackbone registry (SoraSR-T, SoraSR-S, SoraSR-B, SoraSR-L), upsampling heads, and weight loaders
sorasr.lossesCharbonnier, L1, multi-layer VGG perceptual, 2D FFT frequency, and relativistic GAN objectives
sorasr.dataPaired/unpaired dataset loaders, second-order degradation pipelines, and fast patch caching
sorasr.engineDDP training loop, exponential moving average (EMA), mixed precision, and checkpoint rotation
sorasr.exportStatic/dynamic ONNX export, TensorRT engine builder, INT8 calibrator, and overlap-tile runner

Model Family Summary ​

VariantScaleParams (M)ChannelsAttention WindowsTypical Target
SoraSR-T2x / 4x1.8488 × 8Real-time 1080p → 4K streaming
SoraSR-S2x / 4x4.6648 × 8Balanced server inference
SoraSR-B2x / 4x11.49616 × 16High-fidelity perceptual restoration
SoraSR-L4x24.812816 × 16Offline mastering & benchmark research

Where to Go Next ​

  • Follow the Quickstart to upscale sample images or launch a baseline training run in under five minutes.
  • Review Installation for CUDA, PyTorch, and TensorRT compatibility matrices.
  • Dive into Model Architecture to understand how local convolutions and windowed attention interact inside each residual stage.

Released under the Apache-2.0 License.