From c217844c4c4feea9520aa8cac29f9106c8aa27a6 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Fri, 14 Mar 2025 04:30:02 -0700 Subject: [PATCH] Update vision.py --- unsloth/models/vision.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unsloth/models/vision.py b/unsloth/models/vision.py index 6cef050936..b519d2ff6a 100644 --- a/unsloth/models/vision.py +++ b/unsloth/models/vision.py @@ -109,7 +109,7 @@ def unsloth_base_fast_generate( except: pass # Mixed precision autocast - # if os.environ.get("UNSLOTH_FORCE_FLOAT32", "0") == "1": dtype = torch.float32 + if os.environ.get("UNSLOTH_FORCE_FLOAT32", "0") == "1": dtype = torch.float32 with torch.inference_mode(), torch.autocast(device_type = "cuda", dtype = dtype): output = self._old_generate(*args, **kwargs) pass