Spandrel

April 20, 2025 ยท View on GitHub

Spandrel gives your project support for various PyTorch architectures meant for AI Super-Resolution, restoration, and inpainting.

Dependencies

trt requires additional packages:

To install the latest nightly build of PyTorch and Torch-TensorRT, run:

pip install -U packaging setuptools wheel
pip install -U torch torchvision --index-url https://download.pytorch.org/whl/test/cu128
pip install --no-deps -U torch_tensorrt --index-url https://download.pytorch.org/whl/test/cu128
pip install -U tensorrt-cu12 tensorrt-cu12_bindings tensorrt-cu12_libs --extra-index-url https://pypi.nvidia.com

Installation

pip install -U vsspandrel

Usage

from vsspandrel import vsspandrel

ret = vsspandrel(clip, model_path="") # model path is required!

See __init__.py for the description of the parameters.