Super-resolution that treats pixels as a continuous function
It learns a local implicit image function so a single model can upscale photos to any target resolution, not just fixed 2× or 4× multiples.

What it does LIIF is the official PyTorch implementation of a CVPR 2021 Oral paper on image super-resolution. It uses a standard backbone such as EDSR or RDN to encode a low-resolution image into feature maps, then employs a local implicit function to query RGB values at any continuous 2D coordinate. This yields a single model that can generate output at essentially any resolution you specify, rather than requiring separate networks for fixed scale factors.
The interesting bit
The model decouples image content from output dimensions. Instead of predicting a rigid grid of pixels, it behaves like a coordinate-based field: hand it an (x, y) position and the local feature context, and it returns a color. Resolution becomes an inference-time argument, not a training assumption, freeing you from the usual 2×/4×/8× treadmill.
Key highlights
- Single checkpoint supports arbitrary output resolutions; specify exact height and width at inference.
- Pre-trained models provided for EDSR-baseline and RDN backbones.
- Includes
demo.pyfor quick one-off upscaling, plus full training and evaluation scripts for DIV2K, benchmark datasets, and CelebA-HQ. - Dataset caching options range from in-memory (~40 GB for DIV2K) to binary or direct loading to fit hardware constraints.
- Training configurations are plain YAML files, making experiments relatively transparent to modify.
Caveats
- The README offers minimal architectural explanation; you will need the paper to grasp how the implicit function is structured.
- The environment specifies PyTorch 1.6.0, so modern PyTorch compatibility is untested from the docs.
- Reproducing full training requires significant data wrangling—downloading DIV2K, benchmarks, and CelebA-HQ into a rigid folder hierarchy.
Verdict Worth a look if you are researching super-resolution or need one model to handle variable output sizes. Look elsewhere if you need a turnkey, paper-free upscaling utility.
Frequently asked
- What is yinboc/liif?
- It learns a local implicit image function so a single model can upscale photos to any target resolution, not just fixed 2× or 4× multiples.
- Is liif open source?
- Yes — yinboc/liif is open source, released under the BSD-3-Clause license.
- What language is liif written in?
- yinboc/liif is primarily written in Python.
- How popular is liif?
- yinboc/liif has 1.4k stars on GitHub.
- Where can I find liif?
- yinboc/liif is on GitHub at https://github.com/yinboc/liif.