From 7913a68e8b320cc4e03eb37a2bc58477443a83b8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 27 Dec 2025 11:51:43 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- unsloth/models/sentence_transformer.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/unsloth/models/sentence_transformer.py b/unsloth/models/sentence_transformer.py index 9b3903b19b..349b0671a1 100644 --- a/unsloth/models/sentence_transformer.py +++ b/unsloth/models/sentence_transformer.py @@ -630,7 +630,9 @@ class FastSentenceTransformer(FastModel): # if for_inference == True, skip Unsloth optimizations to avoid torch compile issues if for_inference: st_device = device_map - if isinstance(st_device, dict) or (isinstance(st_device, str) and st_device in ["auto", "sequential"]): + if isinstance(st_device, dict) or ( + isinstance(st_device, str) and st_device in ["auto", "sequential"] + ): st_device = None st_model = SentenceTransformer( @@ -742,7 +744,9 @@ class FastSentenceTransformer(FastModel): ) st_device = device_map - if isinstance(st_device, dict) or (isinstance(st_device, str) and st_device in ["auto", "sequential"]): + if isinstance(st_device, dict) or ( + isinstance(st_device, str) and st_device in ["auto", "sequential"] + ): st_device = None st_model = SentenceTransformer(modules = modules, device = st_device)