From a4f665f4374240cdfc828ad78ae642b066de9de6 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 19 Jul 2026 18:33:04 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- unsloth/save.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/unsloth/save.py b/unsloth/save.py index f809743d79..38035b7a32 100644 --- a/unsloth/save.py +++ b/unsloth/save.py @@ -4645,9 +4645,7 @@ def _offload_model_for_quantize_subprocess(model): # disk/meta is NOT: accelerate keeps those parameters off the model # entirely, so removing the hooks and calling .to("cpu") would try to # materialize the whole checkpoint into RAM (or move meta tensors). - if not all( - t.isdigit() or t.startswith(("cuda", "xpu")) or t == "cpu" for t in targets - ): + if not all(t.isdigit() or t.startswith(("cuda", "xpu")) or t == "cpu" for t in targets): return None if not any(t.isdigit() or t.startswith(("cuda", "xpu")) for t in targets): return None # nothing on an accelerator: no GPU memory to reclaim