{"library":"spandrel-extra-arches","title":"spandrel-extra-arches","type":"library","description":"spandrel-extra-arches is a Python library that implements various PyTorch model architectures with restrictive licenses, designed to extend the capabilities of the core `spandrel` package. It enables `spandrel` to automatically detect and load models that might have non-commercial or other specific license requirements, segregating them from `spandrel`'s permissively licensed architectures. The current version is 0.2.0, released on September 15, 2024, and it is actively maintained and developed in conjunction with `spandrel`.","language":"python","status":"active","last_verified":"Sun May 17","install":{"commands":["pip install spandrel-extra-arches"],"cli":null},"imports":["from spandrel_extra_arches.architectures.rcan.__arch.rcan import RCAN"],"auth":{"required":false,"env_vars":[]},"links":{"homepage":null,"github":null,"docs":null,"changelog":null,"pypi":"https://pypi.org/project/spandrel-extra-arches/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null},"quickstart":{"code":"import torch\nfrom spandrel import Spandrel\n\n# Ensure spandrel-extra-arches is installed (pip install spandrel-extra-arches)\n# spandrel will automatically discover architectures provided by spandrel-extra-arches\n\n# Example: Assuming you have a .pth model file for an architecture in spandrel-extra-arches\n# For demonstration, let's pretend 'my_extra_arch_model.pth' is an RCAN model.\n# In a real scenario, `spandrel.Spandrel()` would detect the architecture type.\n\ntry:\n    # This path would be to an actual model file\n    model_path = 'my_extra_arch_model.pth'\n    # Create a dummy model file for demonstration if it doesn't exist\n    if not torch.exists(model_path):\n        # This is a placeholder. A real model would be loaded from a file.\n        # In practice, you'd download a .pth file for an extra arch model.\n        print(f\"[INFO] No model file found at {model_path}. Skipping model loading example.\")\n        print(\"[INFO] Please provide a valid .pth model file for an architecture supported by spandrel-extra-arches to run this part.\")\n    else:\n        # Load the model using spandrel\n        spandrel_model = Spandrel(model_path)\n        print(f\"Model loaded successfully: {spandrel_model.name} - {spandrel_model.arch_name}\")\n        \n        # Example of getting the underlying PyTorch module\n        pytorch_module = spandrel_model.model\n        print(f\"PyTorch module type: {type(pytorch_module)}\")\n\nexcept Exception as e:\n    print(f\"An error occurred during model loading: {e}\")","lang":"python","description":"This quickstart demonstrates how to use the `spandrel` library to load a model file, which would implicitly utilize the architectures provided by `spandrel-extra-arches` if one of its models is detected. The `spandrel` library handles the automatic detection and instantiation of the correct architecture.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-17","installed_version":"0.2.0","pypi_latest":"0.2.0","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":40,"avg_install_s":68,"avg_import_s":null,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"spandrel-extra-arches","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"spandrel-extra-arches","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":79.6,"import_time_s":null,"mem_mb":null,"disk_size":"4.7G"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"spandrel-extra-arches","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"spandrel-extra-arches","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":71.9,"import_time_s":null,"mem_mb":null,"disk_size":"4.8G"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"spandrel-extra-arches","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"spandrel-extra-arches","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":62.7,"import_time_s":null,"mem_mb":null,"disk_size":"4.8G"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"spandrel-extra-arches","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"spandrel-extra-arches","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":57.7,"import_time_s":null,"mem_mb":null,"disk_size":"4.8G"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"spandrel-extra-arches","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"spandrel-extra-arches","exit_code":1,"wheel_type":null,"failure_reason":"timeout","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null}]}}