From b9e5a13d4e0577804df81b674c51e9e59cf8db51 Mon Sep 17 00:00:00 2001 From: Roland Tannous Date: Tue, 14 Apr 2026 22:46:29 +0400 Subject: [PATCH] studio: thread List[str] quantization_method through orchestrator + worker ExportOrchestrator.export_gguf's parameter type is widened from str to List[str]. Worker's cmd.get default becomes ["Q4_K_M"] to match. The orchestrator pickles the list into the mp.Queue cmd dict; the subprocess worker hands it to ExportBackend.export_gguf unchanged. Both layers are pure passthrough for this field. --- studio/backend/core/export/orchestrator.py | 8 ++++++-- studio/backend/core/export/worker.py | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/studio/backend/core/export/orchestrator.py b/studio/backend/core/export/orchestrator.py index 500bc9e706..aa29396f4d 100644 --- a/studio/backend/core/export/orchestrator.py +++ b/studio/backend/core/export/orchestrator.py @@ -310,12 +310,16 @@ class ExportOrchestrator: def export_gguf( self, save_directory: str, - quantization_method: str = "Q4_K_M", + quantization_method: List[str], push_to_hub: bool = False, repo_id: Optional[str] = None, hf_token: Optional[str] = None, ) -> Tuple[bool, str]: - """Export model in GGUF format.""" + """ + Export model in GGUF format. The caller must supply a normalized + list of lowercase quantization method strings (see + `models.export.normalize_gguf_quantization_method`). + """ return self._run_export( "gguf", { diff --git a/studio/backend/core/export/worker.py b/studio/backend/core/export/worker.py index 3f3dc955fa..65fe1542f4 100644 --- a/studio/backend/core/export/worker.py +++ b/studio/backend/core/export/worker.py @@ -139,7 +139,7 @@ def _handle_export(backend, cmd: dict, resp_queue: Any) -> None: elif export_type == "gguf": success, message = backend.export_gguf( save_directory = cmd.get("save_directory", ""), - quantization_method = cmd.get("quantization_method", "Q4_K_M"), + quantization_method = cmd.get("quantization_method", ["Q4_K_M"]), push_to_hub = cmd.get("push_to_hub", False), repo_id = cmd.get("repo_id"), hf_token = cmd.get("hf_token"),