Update vision.py

This commit is contained in:
Daniel Han 2025-03-18 01:43:34 -07:00
commit ee75d8b552

View file

@ -146,7 +146,7 @@ def unsloth_base_fast_generate(
except: pass
# Mixed precision autocast
with torch.inference_mode():
with torch.inference_mode(), torch.autocast(device_type = "cuda", dtype = dtype):
try:
output = self._old_generate(*args, **kwargs)
except: