{"categories":[{"label":"Libraries","url":"https://skillfed.io/packages/category/software-development-libraries/4"}],"enrichment":{"capability":"Spandrel loads and runs pre-trained PyTorch models by automatically detecting their architecture from model files and providing a unified interface for inference.","skillfed_tags":["pytorch-models","model-loading","image-restoration"],"use_cases":["Load and run ESRGAN, SwinIR, HAT, or other super-resolution models without manually implementing architecture detection.","Build an image processing pipeline that supports multiple model formats and architectures through a single interface.","Integrate community-trained PyTorch models into an application without hardcoding architecture-specific loading logic.","Extend model support by contributing new architectures to a shared, centralized package rather than maintaining per-project implementations."],"what_it_does":"Spandrel is a PyTorch model loading library that automatically detects model architecture and hyperparameters from saved model files, then wraps them in a unified interface for inference. It originated from the chaiNNer project and now serves as a central package for architecture support across the community. The library focuses on image models (super-resolution, restoration) but is designed to be extensible for other architectures.\n\nYou provide a path to a model file (.pth, .pt, .ckpt, or .safetensors), and Spandrel identifies the architecture, returns a ModelDescriptor object with metadata, and lets you call the model directly. It does not handle image-to-tensor conversion or other preprocessing\u2014you manage that yourself. The base package includes only permissive-license architectures (MIT, Apache 2.0, public domain); restrictive-license models require the optional spandrel_extra_arches package.","worth_installing":"Yes, if you work with pre-trained PyTorch models and want to avoid architecture-specific loading boilerplate. The library is actively maintained, has low install friction, uses a permissive license, and supports a wide range of image models. Start with the base package; add spandrel_extra_arches only if you need non-commercial or restrictive-license architectures. Note that you must handle tensor preparation yourself\u2014this is not an end-to-end inference library."},"id":"spandrel","links":{"html":"https://skillfed.io/packages/spandrel","md":"https://skillfed.io/packages/spandrel.md","pypi":"https://pypi.org/project/spandrel/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-02-21","license_spdx":null,"license_treatment":"permissive","name":"spandrel","python_support":"supports_current","summary":"Give your project support for a variety of PyTorch model architectures, including auto-detecting model architecture from just .pth files. spandrel gives you arch support."},"popularity":{"monthly_downloads":1553115,"position":3772,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"0.4.2"}
