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 Hanb790b82e42d5
diff --git a/unsloth/models/vision.py b/unsloth/models/vision.pyindex 83bd22f6259..f0085b0f69a 100644--- a/unsloth/models/vision.py+++ b/unsloth/models/vision.py@@ -89,15 +89,20 @@ def unsloth_base_fast_generate(*args,**kwargs,):- print(args, kwargs)if len(args) != 0:input_ids = args[0]elif "input_ids" in kwargs:input_ids = kwargs["input_ids"]elif "input" in kwargs:input_ids = kwargs["input_ids"]+ elif "inputs" in kwargs:+ input_ids = kwargs["inputs"]else:- raise TypeError("Unsloth: You need to pass in input_ids to .generate!")+ key = next(iter(kwargs.keys()))+ if type(kwargs["key"]) is not torch.Tensor:+ raise TypeError("Unsloth: You need to pass in input_ids to .generate!")+ input_ids = kwargs[key]+ passassert(type(input_ids) is torch.Tensor)bsz = input_ids.shape[0]