From f25e1dd6104c90cae4695eb94187cf6d18bbb55d Mon Sep 17 00:00:00 2001 From: Gaspar Rochette Date: Thu, 9 Apr 2026 14:55:50 +0000 Subject: [PATCH 1/3] build: bump max python to 3.13 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2554d8d7..84df53d1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -103,7 +103,7 @@ authors = [ ] license = {file = "LICENSE"} readme = "README.md" -requires-python = ">=3.10,<3.13" +requires-python = ">=3.10,<3.14" keywords = ["AI", "machine learning", "model optimization", "pruning"] classifiers = [ "Development Status :: 4 - Beta", From 6ce626a236f8869e74821128f1239b105fe3b26a Mon Sep 17 00:00:00 2001 From: Gaspar Rochette Date: Fri, 10 Apr 2026 12:20:41 +0000 Subject: [PATCH 2/3] build: isolate realesrgan in a extra for python 3.13 compatibility --- pyproject.toml | 4 +++- src/pruna/algorithms/upscale.py | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 84df53d1..3800a0f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -156,7 +156,6 @@ dependencies = [ "peft>=0.18.0,<0.19.0", "trl<=0.21.0", "termcolor==2.3.0", - "realesrgan" ] [project.optional-dependencies] @@ -195,6 +194,9 @@ awq = [ "llmcompressor>=0.9", "torch>=2.9.0" ] +upscale = [ + "realesrgan", +] full = [ "pruna[stable-fast]", ] diff --git a/src/pruna/algorithms/upscale.py b/src/pruna/algorithms/upscale.py index da28224c..b3a848a2 100644 --- a/src/pruna/algorithms/upscale.py +++ b/src/pruna/algorithms/upscale.py @@ -80,6 +80,7 @@ class RealESRGAN(PrunaAlgorithmBase): "ring_attn", "hyper", ] + required_install: str = "``pip install pruna[upscale]``" def get_hyperparameters(self) -> list: """ From a39e655088cad4e4ee7a85dbec98613ec2ff88cd Mon Sep 17 00:00:00 2001 From: Gaspar Rochette Date: Tue, 21 Apr 2026 14:25:40 +0000 Subject: [PATCH 3/3] test: make upscale test as requiring the upscale extra --- tests/algorithms/testers/upscale.py | 4 +++- tests/conftest.py | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/algorithms/testers/upscale.py b/tests/algorithms/testers/upscale.py index 9601e2b8..d55cf0f5 100644 --- a/tests/algorithms/testers/upscale.py +++ b/tests/algorithms/testers/upscale.py @@ -1,9 +1,11 @@ +import pytest + from pruna.algorithms.upscale import RealESRGAN from .base_tester import AlgorithmTesterBase -# Takes too long to run on CPU, so we explicitly exclude it +@pytest.mark.requires_upscale class TestUpscale(AlgorithmTesterBase): """Test the Upscale algorithm.""" diff --git a/tests/conftest.py b/tests/conftest.py index ce9f7029..6693e17c 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -23,6 +23,7 @@ def pytest_configure(config: Any) -> None: config.addinivalue_line("markers", "requires_intel: mark test that needs pruna[intel]") config.addinivalue_line("markers", "requires_lmharness: mark test that needs pruna[lmharness]") config.addinivalue_line("markers", "requires_whisper: mark test that needs pruna[whisper]") + config.addinivalue_line("markers", "requires_upscale: mark test that needs pruna[upscale]") config.addinivalue_line("markers", "requires_rapidata: mark test that needs pruna[rapidata]") # Category marks config.addinivalue_line("markers", "slow: mark test that run rather long")