From 34521467d67cd9bcf00ddfbe38525d73d46c0cec Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 31 May 2026 10:00:44 +0100 Subject: [PATCH] Raise hosted upload limit --- src/repixelizer/gui.py | 2 +- tests/test_gui.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/repixelizer/gui.py b/src/repixelizer/gui.py index a9267ab..0d3c5b5 100644 --- a/src/repixelizer/gui.py +++ b/src/repixelizer/gui.py @@ -173,7 +173,7 @@ class HostedDemoConfig: def from_env(cls) -> "HostedDemoConfig": hosted_demo = _env_flag("REPIXELIZER_HOSTED_DEMO", False) defaults = { - "max_upload_bytes": 2 * 1_048_576 if hosted_demo else 16 * 1_048_576, + "max_upload_bytes": 5 * 1_048_576 if hosted_demo else 16 * 1_048_576, "max_input_dimension": 2048 if hosted_demo else 4096, "max_output_dimension": 512 if hosted_demo else 1024, "default_steps": 32 if hosted_demo else 48, diff --git a/tests/test_gui.py b/tests/test_gui.py index 9cd7e5c..b8883a0 100644 --- a/tests/test_gui.py +++ b/tests/test_gui.py @@ -728,7 +728,7 @@ def test_gui_hosted_config_endpoint_exposes_demo_limits(monkeypatch, tmp_path: P payload = _response_json(_route_endpoint(app, "/api/config", "GET")()) assert payload["hostedDemo"] is True - assert payload["limits"]["maxUploadBytes"] == 2 * 1_048_576 + assert payload["limits"]["maxUploadBytes"] == 5 * 1_048_576 assert payload["limits"]["maxOutputDimension"] == 512 assert payload["limits"]["defaultSteps"] == 32 assert payload["ui"]["showDeviceControl"] is False @@ -1041,7 +1041,7 @@ def test_hosted_job_options_use_autocorr_and_force_rerank() -> None: config = HostedDemoConfig( hosted_demo=True, show_queue_panel=True, - max_upload_bytes=2 * 1_048_576, + max_upload_bytes=5 * 1_048_576, max_input_dimension=2048, max_output_dimension=512, default_steps=32,