Appearance
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:
- Predictable Compute Envelopes — Every architectural block reports analytical FLOPs and peak activation memory for arbitrary input shapes.
- Modular Objective Composition — Pixel, perceptual, adversarial, and spectral losses are declared declaratively in YAML and weighted via step-based schedules.
- Export-First Operators — All core layers avoid dynamic Python control flow and unsupported custom ops so
torch.onnx.exportsucceeds without graph rewrites. - Reproducible Evaluation — Built-in Y-channel PSNR, SSIM, and LPIPS evaluators enforce identical border cropping and color-space conversion across runs.
Core Modules
| Package | Responsibility |
|---|---|
sorasr.models | Backbone registry (SoraSR-T, SoraSR-S, SoraSR-B, SoraSR-L), upsampling heads, and weight loaders |
sorasr.losses | Charbonnier, L1, multi-layer VGG perceptual, 2D FFT frequency, and relativistic GAN objectives |
sorasr.data | Paired/unpaired dataset loaders, second-order degradation pipelines, and fast patch caching |
sorasr.engine | DDP training loop, exponential moving average (EMA), mixed precision, and checkpoint rotation |
sorasr.export | Static/dynamic ONNX export, TensorRT engine builder, INT8 calibrator, and overlap-tile runner |
Model Family Summary
| Variant | Scale | Params (M) | Channels | Attention Windows | Typical Target |
|---|---|---|---|---|---|
SoraSR-T | 2x / 4x | 1.8 | 48 | 8 × 8 | Real-time 1080p → 4K streaming |
SoraSR-S | 2x / 4x | 4.6 | 64 | 8 × 8 | Balanced server inference |
SoraSR-B | 2x / 4x | 11.4 | 96 | 16 × 16 | High-fidelity perceptual restoration |
SoraSR-L | 4x | 24.8 | 128 | 16 × 16 | Offline 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.