Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Update vision.py
Daniel Han51503620cca7
diff --git a/unsloth/models/vision.py b/unsloth/models/vision.pyindex acf999faffc..53a873d1685 100644--- a/unsloth/models/vision.py+++ b/unsloth/models/vision.py@@ -146,6 +146,8 @@ def unsloth_base_fast_generate(try: kwargs["pixel_values"] = kwargs["pixel_values"].to(dtype)except: pass+ if "use_cache" not in kwargs: kwargs["use_cache"] = True+# Mixed precision autocastif os.environ.get("UNSLOTH_FORCE_FLOAT32", "0") == "1":autocaster = torch.autocast(device_type = "cuda", dtype = dtype)