From afb2cfa36d6d4e1956055ad6f1b5fdd5dd6922f1 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Tue, 18 Mar 2025 01:27:39 -0700 Subject: [PATCH] Update vision.py --- unsloth/models/vision.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/unsloth/models/vision.py b/unsloth/models/vision.py index 22057daf79..9be002ce1f 100644 --- a/unsloth/models/vision.py +++ b/unsloth/models/vision.py @@ -134,8 +134,7 @@ def unsloth_base_fast_generate( except: pass # Mixed precision autocast - if os.environ.get("UNSLOTH_FORCE_FLOAT32", "0") == "1": dtype = torch.float32 - with torch.inference_mode(), torch.autocast(device_type = "cuda", dtype = dtype): + with torch.inference_mode() output = self._old_generate(*args, **kwargs) pass