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 Han6c050b805a70
diff --git a/unsloth/models/vision.py b/unsloth/models/vision.pyindex e741c1c628b..d0831446515 100644--- a/unsloth/models/vision.py+++ b/unsloth/models/vision.py@@ -53,9 +53,10 @@ def _wrap_fast_inference(generate, device_type, dtype, model):kwargs["pad_token_id"] = kwargs.pop("pad_token_id", model_eos_token_id)- if "pixel_values" in kwargs:+ try:kwargs["pixel_values"] = kwargs["pixel_values"].to(model.dtype)- pass+ except:+ pass# Autocastedwith torch.autocast(device_type = device_type, dtype = dtype):